473,487 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Determine the Form to load from Database

Hi,

I have a menu screen and i want to store the menus in a table. Is
the a way that i can load the form according to the menu user has
selected?

Eg:

Menu
=================

1) Order Entry
2) Order Confirmation
3) Delivery

So when user double click on the Menu 2. I will load the Order
Confirmation Form. The name of the form i stored in table

Thank you!
Nov 16 '05 #1
2 1516
Sure, take a look at the CreateInstance method.
http://msdn.microsoft.com/library/de...tanceTopic.asp

There's a few overloads for this method, most of the time I use this one.
http://msdn.microsoft.com/library/de...anceTopic2.asp

"jayson_13" <ja*******@yahoo.com> wrote in message
news:85**************************@posting.google.c om...
Hi,

I have a menu screen and i want to store the menus in a table. Is
the a way that i can load the form according to the menu user has
selected?

Eg:

Menu
=================

1) Order Entry
2) Order Confirmation
3) Delivery

So when user double click on the Menu 2. I will load the Order
Confirmation Form. The name of the form i stored in table

Thank you!

Nov 16 '05 #2
Andy,
Thanks for your information!
This is how i do. But i have a few questions.

ObjectHandle obj = Activator.CreateComInstanceFrom(Assembly.GetExecut ingAssembly().CodeBase.ToString(),typeof(Form2).To String());
Object o = obj.Unwrap();
((Form2)o).Show();

I got the name of the form i want to load stored in a string
variable let says vFormName. How do i load this form? Can give me an
example? Thanks!

"Andy Gaskell" <pubb AT hotmail DOT com> wrote in message news:<u9**************@TK2MSFTNGP09.phx.gbl>...
Sure, take a look at the CreateInstance method.
http://msdn.microsoft.com/library/de...tanceTopic.asp

There's a few overloads for this method, most of the time I use this one.
http://msdn.microsoft.com/library/de...anceTopic2.asp

"jayson_13" <ja*******@yahoo.com> wrote in message
news:85**************************@posting.google.c om...
Hi,

I have a menu screen and i want to store the menus in a table. Is
the a way that i can load the form according to the menu user has
selected?

Eg:

Menu
=================

1) Order Entry
2) Order Confirmation
3) Delivery

So when user double click on the Menu 2. I will load the Order
Confirmation Form. The name of the form i stored in table

Thank you!

Nov 16 '05 #3

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

Similar topics

2
363
by: Job Lot | last post by:
I have an in house application which uses 3 different version of the same database. When application starts a form is displayed which allows user to provide the path to the database. My problem is...
0
2429
by: dlieu | last post by:
I've found an odd situation in where the Load event of the active form fires (after the Unload event) when Access is closed. I am able to reproduce this situation in Access 2002 SP3 and Access 2003...
30
3365
by: Wes | last post by:
On a nightly basis, we shut the database down and do a file system backup. A short chronology of our database problem: 8/21 - count(*) of user tables succeeded (done once a week to get...
1
2451
by: =?Utf-8?B?UmljaA==?= | last post by:
In a database search application (vb2005), the user wants to be able to scroll through records using the mousewheel. The data display form contains textboxes for the main data and a datagridview...
19
19020
by: =?Utf-8?B?R3JlZw==?= | last post by:
How can I tell via code if a Form is already open. Each time my forms load I have some initialization code that runs, but if the form is already open and hidden I don't want that initialization...
13
3219
JodiPhillips
by: JodiPhillips | last post by:
G'day, I have a silly and simple problem that I need some guidance with. Due to the way our network is set up, I am unable to use the group permissions for Access and have had to implement log...
16
2691
by: Steve | last post by:
I am working on a database that has a main menu, many sub-menus and some sub-sub-menus. They are all forms that have numerous command buttons on them to open forms and reports in the database. The...
8
1901
by: Michael R | last post by:
Hi everyone. I have a few subforms in the main form that are dependent on each other with their data (not with child/master fields). Sometimes I get an invalid reference error because the...
4
2988
by: rb0135 | last post by:
Hi, I am writing a C# mobile 6 (dot.net 3.5) application. On the form, I have a label. I update this label with text as my initalizing routines are running (from the form load event), such as...
0
7106
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7137
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7181
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7349
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
600
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
267
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.