|
-
Jul 15th, 2003, 01:39 PM
#1
Thread Starter
New Member
load a form in OCX
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|