>Hi Brain,
>
>Thanks for your valuable advise, but is it able to declare the Object variable as what we type from the textbox?
>
>Let say, I type "Form2" to the textbox, then the VB will show Form2. It because I will have nearly a few hundred of forms need to be running in this way, so I think it is not able to build a index as following :
>
>select case textbox.text
> case "Form1"
> Form1.show
> case "Form2"
> Form2.show
> ...
>end select
>
>You got a better idea?
>
>Thanks
>Aston
That seems a rather peculiar way to reference forms - from a text box. Generally it is easier to give someone a combo box or lock them into choices.
You can indeed instantiate the forms as I previously wrote in the case blocks also.
>select case textbox.text
> case "Form1"
dim f1 as new Form1
f1.Show
> case "Form2"
dim f2 as new Form1
f2.show
> ...
>end select
Brian Seekford
Seekford Solutions, Inc.http://www.SeekfordSolutions.comInternet 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!