|
-
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.
-
Jul 15th, 2003, 05:46 PM
#2
What is the actual error? (Number/Description)
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Jul 15th, 2003, 07:44 PM
#3
Thread Starter
New Member
There isn't a specific Error number shown. A message box appears with the following information.
"Runtime Error!
The application has requested the Runtime to terminate it in an unusual way. Please contatct the application's support team for more information."
Thats all it says. So I was wondering whether the problem arises because we are trying to open a form in an OCX from a different application(here it is a VC++ client ).
Hope this helps!
thanks
-
Jul 17th, 2003, 06:52 AM
#4
Hyperactive Member
Originally posted by trc_007
There isn't a specific Error number shown. A message box appears with the following information.
"Runtime Error!
The application has requested the Runtime to terminate it in an unusual way. Please contatct the application's support team for more information."
Thats all it says. So I was wondering whether the problem arises because we are trying to open a form in an OCX from a different application(here it is a VC++ client ).
Hope this helps!
thanks
I guess you have to use MyForm.Show vbModal
;-)
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
|