November 9th, 2003, 01:30 PM
VB.NET: Events and Initialization
I'm trying out VB.NET for the first time, and I'm trying to upgrade an old VB 6.0 project. I'm having a problem with events that reference other events. It gives me this upgrade warning:
Which is all well and good. Going to the help file gives you the nice suggestion to add a property called IsInitializing on the form and do something like this:
'UPGRADE_WARNING: Event cmbCategory.TextChanged may fire when form is intialized.
'Click for more: 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup2075"'
But the help file compleatly fails to mention how to implement the IsInitializing property. Can anybody help me out here?
Private Sub Check1_CheckStateChanged(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Check1.CheckStateChanged
If Form1.DefInstance.IsInitializing = True Then
TextBox1.Text = "Check1 was clicked"