Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The Object Manipulation in ActiveX
Message
 
To
03/07/2003 00:21:06
General information
Forum:
Visual Basic
Category:
ActiveX controls
Miscellaneous
Thread ID:
00806418
Message ID:
00806608
Views:
17
>Dear all,
>
>How can I open the form which resided at VB project from ActiveX.
>
>I got a ActiveX with 1 textbox and 1 button, once the user key-in the form name to textbox and click the button, then I want the system able to open the specified form.
>
>Let's say the textbox and button are on the same usercontrol :
>Private Sub Button1_Click()
> select case textbox.text
> case "form1"
> form1.show
> end select
>End Sub
>
>But the system highlight the "form1.show" and say "object required". Is there any way to solve this problem?
>
>
>Thanks
>Aston


Make sure the Form is in the Same project as the Control.

ALso, it is bad practice to call the object like that.

dim fMyForm as new Form1
fMyForm.Show

is a better approach. or another way if you need to access member variables on it is this:

dim fMyForm as Form1
set fMyForm = new Form1
fMyForm.Show

'access variables ie. fMyForm.m_bCancelled
unload fMyForm
set fMyForm = nothing
Brian Seekford
Seekford Solutions, Inc.
http://www.SeekfordSolutions.com
Internet ActiveX Controls and .NET Class Libraries.
SMTP/S FTP POP3/S HTTP/S SNTP MIME PING WHOIS TRACEROUTE NNTP DNS MX
Base64, UUEncode, yEnc, MD5, SHA1, URL, Quoted-Printable.
Resizer and Tooltips
Email Verification and more. Check us out!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform