473,326 Members | 2,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Open a form using a string

DC
Hi all,
is there any way to open a form (create an instance) when its name is stored
in a string variable?

By the way, in other post, someone wrote that datagrid is mostly used with
datasets/datatables rather than arraylists. My question is, in either cases I
must set up columns, don't I? (assuming I want to personalize those columns)

TIA,
DC
Nov 21 '05 #1
1 2171
"DC" <DC@discussions.microsoft.com> schrieb:
is there any way to open a form (create an instance) when its name is
stored
in a string variable?


\\\
Dim frm As Form = _
DirectCast( _
Activator.CreateInstance( _
Type.GetType("MyApplication.SampleForm") _
), _
Form _
)
frm.Show()
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: petersk | last post by:
Firstly I am an older person trying to teach myself to create a project and teach myself Access VBA programming along the way. I anticipate a number of problems I will need help with but here...
0
by: Niyazi | last post by:
Hi, I created application that store the data in SQL SERVER that reside on network. The client also use this application to access the resources provided with application. But is the client want...
3
by: vidhyapriya | last post by:
Hi all I am developing windows application using vb.net.I want to pass values to open form.I am opening only one form when user click the buttons several times.Useing delegate i am passing...
1
by: sunnyluthra1 | last post by:
Hi Everyone, I am working on a piece of code, that displays the properties(Name, Datatype, size & Description) of the table in the database. Now I want to further Enhance the code. I Have created...
14
by: SimeonD | last post by:
Hi I have an access database called Sales.Mdb In vb.net 2005, I'd like to open it. Which I can do. What I can't figure out is how to figure out if Sales.Mdb is open already. If so, I want to open...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.