Break point problem
Messages   Related Types
This message was discovered on microsoft.public.dotnet.general.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...

Job Lot (VIP)
have a main form with menu control on it. I am opening various forms on
click of different menu items. Below is one the procedure I am using. I am
running my app in Debug mode.

Private Sub mnuSearch_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles mnuSearch.Click
Dim frm As New frmPlanMaintain
frm.ShowDialog(Me)

If frm.DialogResult = DialogResult.OK Then
'Do something...
End If

frm.Dispose()
End Sub

I have place break point on above procedure. Now when I access the menu
option with above associated procedure, without accessing any other menu
option, it goes into break mode. But, if I access any other menu option,
prior to the one associated with above procedure, it does not go into break
mode. I am really confused. What’s going wrong? Please help.

Reply to this message...
 
    
Cor Ligthert
Job,

Without seeing the from that other meny there is no possibility to answer
that, however are you sure it is not going in a loop in that other part.

In the code you show is nothing strange, it creates a form and disposed a
form so everything will be made everytime completly new.

Cor

[Original message clipped]

Reply to this message...
 
    
Job Lot (VIP)
Does referring Public variable or control values from initialize form causes
any problem, as follows

Private Sub mnuSearch_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles mnuSearch.Click
Dim frm As New frmPlanMaintain
frm.ShowDialog(Me)

If frm.DialogResult = DialogResult.OK Then
    'Referencing Public variable, control value from frmPlanMaintain
    Me.Plan_ID = frm.PlanID
    Me.Client_ID = frm.txtClientID.Text    
End If

frm.Dispose()
End Sub

"Cor Ligthert" wrote:

[Original message clipped]

Reply to this message...
 
    
Cor Ligthert
Job,

What you show is as standard as standard can be.

Cor

Reply to this message...
 
    
Job Lot (VIP)
Hi Cor,

Okay its working fine on my loptop at home, but not at work. Is there any
specifc IDE setting I am missing at work? Thanks

"Cor Ligthert" wrote:

[Original message clipped]

Reply to this message...
 
    
Cor Ligthert
Job,

The most made error people make in this is that they set there IDE in run in
"release" mode instead in "debug" mode.

Maybe did you that as well at work?

Cor

Reply to this message...
 
 
System.EventArgs
System.Object
System.Windows.Forms.DialogResult




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com