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 said:
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.WriteLine("frmSplash.showdialog")
bContinue = frmSplash.ShowDialog()
'Display without showmodal
Console.WriteLine("Now frmsplash.show")
frmSplash.Show()
Here is the load event handler of the form:
Private Sub BInitSplash_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Console.WriteLine(Me.Name & " load event is firing.")
'Fill in controls as necessary
cbRemember.Checked = bRemember
If bRemember Then
tbUserName.Text = sUserName
tbPassword.Text = sPassword
tbDatabaseName.Text = sDatabaseName
tbServerLocation.Text = sServerLocation
End If
End Sub
Here is the console output:
[snip]
'BInitPro.exe': Loaded 'c:\windows\assembly\gac\microsoft.visualbasic\7.0.3300.0__b03f5f7f11d50a3a\microsoft.visualbasic.dll', No symbols loaded.
frmSplash.showdialog
Now frmsplash.show
BInitSplash load event is firing.
'BInitPro.exe': Loaded 'c:\erix\work\binitpro\bin\interop.scripting.dll', No symbols loaded.
[snip]