?
Solved

Dynamically loading forms based only on a string

Posted on 2006-06-02
3
Medium Priority
?
159 Views
Last Modified: 2010-04-23
I have a combobox with form names in it.  I would like to take the text name of those forms, hit an event handler, and dynamically load the selected form.  Unfortunately, I keep getting stuck.  I'm looking for something along the lines of the code I wrote below (though obviously it doesn't actually work).

Thanks in advance for any help!


Dim x as string
x = "Form2"

Dim obj as object
obj = CType(obj, gettype(x)).ShowDialog
0
Comment
Question by:glass_snake
3 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16819618
.NET version?

Bob

0
 

Accepted Solution

by:
drquan earned 1000 total points
ID: 16819676
0
 

Author Comment

by:glass_snake
ID: 16819686
Version 1.1.

Thanks, drquan, that did it!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question