Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can't to load Form?
Message
From
19/01/2011 12:51:22
 
 
To
19/01/2011 12:26:09
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows XP
Miscellaneous
Thread ID:
01496430
Message ID:
01496572
Views:
25
Ah, ok ... you did not show the Load eventhandler before, so I didn't realize that's where you were trying to set the breakpoint.

You say that you're showing the JobInformation form with .ShowDialog(), but in the code snippets you've posted, the one in the Button Click of the ClientInformation form uses JobInformation.Show() ... I don't know if you meant to use Show() or ShowDialog(), or if you've just posted your code incorrectly. But, this may be your problem. When using .Show(), the Load event will only fire once, and so your breakpoint will not be hit the second time.

~~Bonnie


>Yes, my question i write the mainpage have MenuStrip,
>1.Company > go to clinetInformation.ShowDialog()
>2.job > go to jobInformation.ShowDialog()
>
>In clinetinformation form , i have a button, if onclick will go to jobInformation.ShowDialog()
>So Two method can go to jobInformation form .
>one is direct click , second is go to clinetInformation first and click the button go to jobInformation.....
>
>All form is no problem .... i set the breakpoint in jobInformation page to test.....
>If i go to menu 2.job > go to jobInformation.ShowDialog()
>the breakpoint is work ......
>After i go to 1.Company > go to clinetInformation.ShowDialog() and click the button go to jobInformation
>In this time question appear, the breakpoint is not work, but the jobInformation also show ......
>
>
>main page
>--------------------
>Public Class mainpage
>
>    Private Sub JobToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles JobToolStripMenuItem.Click
>        clinetInformation.ShowDialog()
>    End Sub
>
>Private Sub JobToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles JobToolStripMenuItem1.Click
>        jobInformation.ShowDialog()
>    End Sub
>end class
>
>jobinformation page
>-------------------------
>Public Class jobInformation                                                    'set the breakpoint , first time is ok , but second no interrupt
>    Dim pass As Integer
>
>Private Sub jobInformation_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
>  'set the breakpoint , first time is ok , but second no interrupt
>
>If pass = 1 Then
>            If clinetInformation.txtCompany_no.Text <> "" Then
>                cmboCompanyId.Text = clinetInformation.txtCompany_no.Text
>            End If
>end sub
>    Public Property companypass() As Integer
>        Get
>            Return Me.pass
>        End Get
>        Set(ByVal value As Integer)
>            pass = value
>        End Set
>    End Property
>end class
>---------------------------------------------------------------------------------------
>clinetInformation page
>
>Public Class clinetInformation
>
>
>Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butPost.Click
>        jobInformation.companypass = 1
>        jobInformation.Show()
>    End Sub
>end class
>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform