Jay,
I have a breakpoint in the load event handler on the line that writes to the console. That breakpoint is not encountered if the showdialog method is used but it is when the show method is used.
You can see from the console output that the write does not occur after the showdialog method is used.
I appreciate any suggestions you might have on this.
"Jay B. Harlow [MVP - Outlook]" wrote:
Engineerik,
I use ShowDialog and my Load event fires.
Can you attach a 15 to 20 line sample program that demostrates the problem.
Hope this helps
Jay
Here is a code snippet and the console output I got.
The following code is in sub main() which is the startup object
Friend WithEvents frmSplash As New BInitSplash()
Friend WithEvents frmMain As New frmBInitMain()
[snip]
'Display the Splash Form
Console.WriteLi ne("frmSplash.s howdialog")
bContinue = frmSplash.ShowD ialog()
'Display without showmodal
Console.WriteLi ne("Now frmsplash.show" )
frmSplash.Show( )
Here is the load event handler of the form:
Private Sub BInitSplash_Loa d(ByVal sender As Object, ByVal e As System.EventArg s) Handles MyBase.Load
Console.WriteLi ne(Me.Name & " load event is firing.")
'Fill in controls as necessary
cbRemember.Chec ked = bRemember
If bRemember Then
tbUserName.Text = sUserName
tbPassword.Text = sPassword
tbDatabaseName. Text = sDatabaseName
tbServerLocatio n.Text = sServerLocation
End If
End Sub
Here is the console output:
[snip]
'BInitPro.exe': Loaded 'c:\windows\ass embly\gac\micro soft.visualbasi c\7.0.3300.0__b 03f5f7f11d50a3a \microsoft.visu albasic.dll', No symbols loaded.
frmSplash.showd ialog
Now frmsplash.show
BInitSplash load event is firing.
'BInitPro.exe': Loaded 'c:\erix\work\b initpro\bin\int erop.scripting. dll', No symbols loaded.
[snip]