R
Rob Richardson
Greetings!
I have a VB.Net 2003 project that was originally written in VB6, converted
to VB.Net 2002, and then converted to VB.Net 2003. I am trying to handle a
form's Resize event. I put a breakpoint in it and saw that that event got
fired four times before the form's Load event got fired! I then saw that I
have the following routine in the form's code:
Private Const WM_SHOWWINDOW = &H18
Private m_loaded As Boolean
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
If m.Msg = WM_SHOWWINDOW Then
If Not m_loaded Then
MyBase.OnLoad(New System.EventArgs())
End If
End If
MyBase.WndProc(m)
End Sub
And my form's Load event sets the m_loaded flag to true.
I never put that routine in. I presume it was added at some point in one of
those conversions. Why is it here?
Thanks!
Rob
I have a VB.Net 2003 project that was originally written in VB6, converted
to VB.Net 2002, and then converted to VB.Net 2003. I am trying to handle a
form's Resize event. I put a breakpoint in it and saw that that event got
fired four times before the form's Load event got fired! I then saw that I
have the following routine in the form's code:
Private Const WM_SHOWWINDOW = &H18
Private m_loaded As Boolean
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
If m.Msg = WM_SHOWWINDOW Then
If Not m_loaded Then
MyBase.OnLoad(New System.EventArgs())
End If
End If
MyBase.WndProc(m)
End Sub
And my form's Load event sets the m_loaded flag to true.
I never put that routine in. I presume it was added at some point in one of
those conversions. Why is it here?
Thanks!
Rob