By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,064 Members | 1,524 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,064 IT Pros & Developers. It's quick & easy.

Problem while debugging

P: n/a
Hi

When I'm debugging and somewhere in the code I have a breakpoint, many
times when the code after breakpoint finishes and the app returns I
can do nothing within in it(it's like freeze)... The app behaves
strangely and not accepts any event even close event!!!!! It just
lefts for me to stop debugging clicking the respective button in the
vs.net toolbar... I don't know if this behaviour is a bug of vs.net or
if it's consequence of bad code ... But if would be bad code I think
it should stop with any kind of error...
Did anybody experienced something like this??

Thanks in advance
Nov 21 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
More than likley its bad code, what version are u using ?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"?scar Martins" <su******@hotmail.com> wrote in message
news:22**************************@posting.google.c om...
Hi

When I'm debugging and somewhere in the code I have a breakpoint, many
times when the code after breakpoint finishes and the app returns I
can do nothing within in it(it's like freeze)... The app behaves
strangely and not accepts any event even close event!!!!! It just
lefts for me to stop debugging clicking the respective button in the
vs.net toolbar... I don't know if this behaviour is a bug of vs.net or
if it's consequence of bad code ... But if would be bad code I think
it should stop with any kind of error...
Did anybody experienced something like this??

Thanks in advance

Nov 21 '05 #2

P: n/a
* su******@hotmail.com (?scar Martins) scripsit:
When I'm debugging and somewhere in the code I have a breakpoint, many
times when the code after breakpoint finishes and the app returns I
can do nothing within in it(it's like freeze)... The app behaves
strangely and not accepts any event even close event!!!!! It just
lefts for me to stop debugging clicking the respective button in the
vs.net toolbar... I don't know if this behaviour is a bug of vs.net or
if it's consequence of bad code ... But if would be bad code I think
it should stop with any kind of error...


I have never experienced this behavior. What version of VS.NET are you
using? Can you post some code that causes this behavior?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #3

P: n/a
Oscar,

I had this behaviour in VS2002 and when I am debugging where things as
hoovering a mouse and like that are in it.

So confirm the message from OHM, tell us something more.

Cor
Nov 21 '05 #4

P: n/a
I'm using VS.NET 2003 vrs 7.1.3008.
I must say that if I don't have any breakpoint the app behaves
normal(not always). Just when I put a breakpoint it assumes always
that described behaviour...

In my application I have a project with a main form and 2 forms with
one panel each... I also have a module (startup) which has declared
the 3 forms as public. This module instanciates and runs the main
form... This main form as a sector(panel) which its filled with a
default panel... When I press a toolbar button the main form removes
the default panel and adds the sector(panel) the respective
panel(instanciating the form if 1rst time added). So far I have just 2
panels as mentioned above. Then, Some events make the panels be
removed and added as the user interacts...
I think the behaviour of the app may be caused by this kind of
"floating panels" that are all publics (the forms) and which one
accesses the database everytime with its own private DB access
object.... Or no??
I'm thinking about to reinstall the VS.net because I can't debug the
app and trace the objects behaviour and its values....

I'm stuck..
Thanks

"One Handed Man \( OHM - Terry Burns \)" <news.microsoft.com> wrote in message news:<#c**************@TK2MSFTNGP09.phx.gbl>...
More than likley its bad code, what version are u using ?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"?scar Martins" <su******@hotmail.com> wrote in message
news:22**************************@posting.google.c om...
Hi

When I'm debugging and somewhere in the code I have a breakpoint, many
times when the code after breakpoint finishes and the app returns I
can do nothing within in it(it's like freeze)... The app behaves
strangely and not accepts any event even close event!!!!! It just
lefts for me to stop debugging clicking the respective button in the
vs.net toolbar... I don't know if this behaviour is a bug of vs.net or
if it's consequence of bad code ... But if would be bad code I think
it should stop with any kind of error...
Did anybody experienced something like this??

Thanks in advance

Nov 21 '05 #5

P: n/a
Ive been all morning (portugal) struggling with this problem and Ive
figured it out... Now I know this behaviour comes from the public
declared "floating panels" mentioned above... I've tried it with this
simple code with 2 forms and one module (module 1,form2 and form3):

MODULE 1

Module Module1
Public objForm2 As New Form2
Public objForm3 As New Form3
Sub main()

Application.Run(New Form2)

End Sub

End Module

--------------------------------------------------------------------
FORM 2

Public Class Form2
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form
Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Panel1 As System.Windows.Forms.Panel
Friend WithEvents Panel2 As System.Windows.Forms.Panel
Friend WithEvents Button1 As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.Panel1 = New System.Windows.Forms.Panel
Me.Panel2 = New System.Windows.Forms.Panel
Me.Button1 = New System.Windows.Forms.Button
Me.Panel1.SuspendLayout()
Me.Panel2.SuspendLayout()
Me.SuspendLayout()
'
'Panel1
'
Me.Panel1.BackColor =
System.Drawing.SystemColors.ActiveCaption
Me.Panel1.Controls.Add(Me.Panel2)
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill
Me.Panel1.Location = New System.Drawing.Point(0, 0)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(784, 398)
Me.Panel1.TabIndex = 0
'
'Panel2
'
Me.Panel2.BackColor = System.Drawing.Color.Red
Me.Panel2.Controls.Add(Me.Button1)
Me.Panel2.Location = New System.Drawing.Point(128, 56)
Me.Panel2.Name = "Panel2"
Me.Panel2.Size = New System.Drawing.Size(464, 248)
Me.Panel2.TabIndex = 0
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(160, 88)
Me.Button1.Name = "Button1"
Me.Button1.TabIndex = 0
Me.Button1.Text = "Button1"
'
'Form2
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(784, 398)
Me.Controls.Add(Me.Panel1)
Me.Name = "Form2"
Me.Text = "Form2"
Me.Panel1.ResumeLayout(False)
Me.Panel2.ResumeLayout(False)
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Panel1.Controls.RemoveAt(0)
Panel1.Controls.Add(objForm3.Panel1)
End Sub
End Class

---------------------------------------------------------------------
FORM 3

Public Class Form3
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form
Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Panel1 As System.Windows.Forms.Panel
Friend WithEvents Button1 As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.Panel1 = New System.Windows.Forms.Panel
Me.Button1 = New System.Windows.Forms.Button
Me.Panel1.SuspendLayout()
Me.SuspendLayout()
'
'Panel1
'
Me.Panel1.BackColor = System.Drawing.Color.Firebrick
Me.Panel1.Controls.Add(Me.Button1)
Me.Panel1.Location = New System.Drawing.Point(64, 40)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(560, 272)
Me.Panel1.TabIndex = 0
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(224, 96)
Me.Button1.Name = "Button1"
Me.Button1.TabIndex = 0
Me.Button1.Text = "Button1"
'
'Form3
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(680, 357)
Me.Controls.Add(Me.Panel1)
Me.Name = "Form3"
Me.Text = "Form3"
Me.Panel1.ResumeLayout(False)
Me.ResumeLayout(False)

End Sub

#End Region
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
objForm2.Panel1.Controls.RemoveAt(0)
objForm2.Panel1.Controls.Add(objForm2.Panel2)
End Sub
End Class

Try this please....
When you press the button on form 3 you can see that you can't close
the form in the right sided corner X button, and nothing happens...
It seems like in Form2 I can add the objForm3.panel1 to its
controls...But in Form 3 I can't add its controls objForm2.panel2 ...
Why? Am I thinking in a wrong way? Certainly...
There is any kind of way to add and remove panels in main form as
the user interacts clicking, but the panels having possibility to
handle objects of other panels... A little bit confusing!!!

Thanks in advance

su******@hotmail.com (?scar Martins) wrote in message news:<22**************************@posting.google. com>...
I'm using VS.NET 2003 vrs 7.1.3008.
I must say that if I don't have any breakpoint the app behaves
normal(not always). Just when I put a breakpoint it assumes always
that described behaviour...

In my application I have a project with a main form and 2 forms with
one panel each... I also have a module (startup) which has declared
the 3 forms as public. This module instanciates and runs the main
form... This main form as a sector(panel) which its filled with a
default panel... When I press a toolbar button the main form removes
the default panel and adds the sector(panel) the respective
panel(instanciating the form if 1rst time added). So far I have just 2
panels as mentioned above. Then, Some events make the panels be
removed and added as the user interacts...
I think the behaviour of the app may be caused by this kind of
"floating panels" that are all publics (the forms) and which one
accesses the database everytime with its own private DB access
object.... Or no??
I'm thinking about to reinstall the VS.net because I can't debug the
app and trace the objects behaviour and its values....

I'm stuck..
Thanks

"One Handed Man \( OHM - Terry Burns \)" <news.microsoft.com> wrote in message news:<#c**************@TK2MSFTNGP09.phx.gbl>...
More than likley its bad code, what version are u using ?

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"?scar Martins" <su******@hotmail.com> wrote in message
news:22**************************@posting.google.c om...
Hi

When I'm debugging and somewhere in the code I have a breakpoint, many
times when the code after breakpoint finishes and the app returns I
can do nothing within in it(it's like freeze)... The app behaves
strangely and not accepts any event even close event!!!!! It just
lefts for me to stop debugging clicking the respective button in the
vs.net toolbar... I don't know if this behaviour is a bug of vs.net or
if it's consequence of bad code ... But if would be bad code I think
it should stop with any kind of error...
Did anybody experienced something like this??

Thanks in advance

Nov 21 '05 #6

P: n/a
HI

Please see post 3 and 4..

I've progressed a little bit but I still have the same problem..Now I
surely know that my problem is caused by the panels... And now I'm
thinking that I can't do this the way I've thought it.
I want to have a main form which have one toolbar and one left docked
explorerbar... I've created one form for each panel I wanted to show
under the same project, and I was adding/removing them to the main
form controls collection. But the app started to have the mentioned
behaviour when in one form/panel I access to objects of other
form/panel... For example, when the user is in one form and click one
button another form/panel appears (adding/removing them to the main
form controls):

Public Class frmNavegacaoPrincipal

Private Sub UltraExplorerBar1_ItemClick(ByVal sender As
System.Object, ByVal e As
Infragistics.Win.UltraWinExplorerBar.ItemEventArgs ) Handles
UltraExplorerBar1.ItemClick

....
Case "ImprimirMaisEtiquetas"

If objPanelImprimirMaisEtiquetas Is Nothing Then
objPanelImprimirMaisEtiquetas = New
frmgisticaImprimirMaisEtiqueta
pnlImprimirMaisEtiquetas = New Panel
pnlImprimirMaisEtiquetas =
objPanelImprimirMaisEtiquetas.pnlIME
End If
....
I figured out (with a simple test project)that I had to declare public
in a project-level module the panels and the respective form:

Public objPanelEtiquetasImprimir As frmLogisticaEtiquetasImprimir
Public pnlImprimirMaisEtiquetas As Panel

And like this I had no more that strange behaviour... When I add/rem
the panel I use pnlImprimirMaisEtiquetas but to call subs or functions
in the panel/form I use directly objPanelEtiquetasImprimir.Anything...
When I tried to pass this idea to my 3 month project... oooops... Many
problems... behind main form I have other panels added in Windows
Generated Code by the explorerbar and toolbars... And my problems
persist... I tried to declare these extra panels public and modify the
Windows Generated Code but I have more problems now...
Am I thinking the best way, or is there any other way to perform
this??

I just want a single Document Interface that have one sector
transforming as the user interacts with it... Explorerbar and Tollbars
just call the Panel or whatever it is that corresponds to the item
clicked!!!

Thanks in advance


"Cor Ligthert" <no**********@planet.nl> wrote in message news:<O0**************@TK2MSFTNGP09.phx.gbl>...
Oscar,

I had this behaviour in VS2002 and when I am debugging where things as
hoovering a mouse and like that are in it.

So confirm the message from OHM, tell us something more.

Cor

Nov 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.