SqueakinSweep
Programmer
Im sure Im missing something obvious here. I worked with Foxpro for many years and the controls had events such as Load and Init, where Load fired before the form was available but Init fired once the form was instantiated. This event was available for every control on the form, if so desired.
In VB.NET, we have NEW. When using New on a control, if you try to use .FindForm in this event you get back Nothing, which is quite understandable. What I do need however is to trap an event which fires once the control and form is instantiated. The reason being is that my control needs to look at the form, to see which module it belongs to, and do some registry checking at this point for default values.
Here is the code I want to execute, and I want it to run before control.enter as I have it on now!
I'd also be interested in any reference anyone has to the firing sequence of form load events.
Sweep
...if it works dont mess with it
In VB.NET, we have NEW. When using New on a control, if you try to use .FindForm in this event you get back Nothing, which is quite understandable. What I do need however is to trap an event which fires once the control and form is instantiated. The reason being is that my control needs to look at the form, to see which module it belongs to, and do some registry checking at this point for default values.
Here is the code I want to execute, and I want it to run before control.enter as I have it on now!
Code:
Dim fParent As fwControls.MyFormBase
fParent = CType(Me.FindForm, fwControls.MyFormBase)
Dim sModule As String = CStr(fParent.eModule)
I'd also be interested in any reference anyone has to the firing sequence of form load events.
Sweep
...if it works dont mess with it