trc_007
Jul 15th, 2003, 01:39 PM
I am a novice in VB. I have written an ActiveX control in VB6.0 which loads a form ( or atleast that was my intention). Here is the function in the ocx.
Public Function ocxMain1()
MsgBox "In VB OCX before calling form load"
MyForm.Show
End Function
MyForm is a form in the ocx. The form has 3 to 4 buttons which perform some screen capturing functions. I have written a VC++ client that calls the ocx function. It correctly displays the message box but gives a 'Runtime Error' in the MyForm.show line.
Can anyone enlighten me why this error is generated. My understanding is that forms can be loaded in an OCX. is this correct? If so, what is the right way to load a form? I appreciate the help.
Public Function ocxMain1()
MsgBox "In VB OCX before calling form load"
MyForm.Show
End Function
MyForm is a form in the ocx. The form has 3 to 4 buttons which perform some screen capturing functions. I have written a VC++ client that calls the ocx function. It correctly displays the message box but gives a 'Runtime Error' in the MyForm.show line.
Can anyone enlighten me why this error is generated. My understanding is that forms can be loaded in an OCX. is this correct? If so, what is the right way to load a form? I appreciate the help.