Visual Basic C# question

dalton.lesko088

Baseband Member
Messages
55
Location
USA
I am currently programming an MTO ordering program in c#Visual Basic express. It is finished but not the way I would like it to be. Does anyone know how to program a button so that another page of buttons comes up once it is pressed? For example, you want to order a hot dog or something. You press the hot dog button and another page comes up with condiments and toppings etc. can anyone help me? Right now I just have check boxes, buttons, and text boxes (for quantity) hidden underneath the food option button. It's very sloppy.


Sent from my iPhone using Tech-Forums
 
I'm assuming you already have the other form created. Let's call it... Condiments.

and I'm assuming you mean C#, not Visual Basic right? They're 2 different languages ;).

Double click the button in the designer window to take you to the auto-generated stub for the button click event.

In there, just type
Code:
Condiments con = new Condiments();
con.Show();

That will open over top of your existing form. You'll have to figure out logic to keep the saved info, however, from that form and get it to transfer over to the original form when you close the Condiments window. Would probably be a good idea to create a new class/object and give it properties that pertain to your details, and then return that back to the main window. I believe there's some way where you can still access the Condiment form's class variables from the main form, but I can't remember how off the top of my head (I remember doing it in one of my own apps before while I was playing around with stuff).
 
Last edited:
I'm assuming you already have the other form created. Let's call it... Condiments.

and I'm assuming you mean C#, not Visual Basic right? They're 2 different languages ;).

Double click the button in the designer window to take you to the auto-generated stub for the button click event.

In there, just type
Code:
Condiments con = new Condiments();
con.Show();

That will open over top of your existing form. You'll have to figure out logic to keep the saved info, however, from that form and get it to transfer over to the original form when you close the Condiments window. Would probably be a good idea to create a new class/object and give it properties that pertain to your details, and then return that back to the main window. I believe there's some way where you can still access the Condiment form's class variables from the main form, but I can't remember how off the top of my head (I remember doing it in one of my own apps before while I was playing around with stuff).


I got the name of the program wrong it's visual studio haha I don't know why I always call it viaual basic. I know they're two different languages. I'm just a dumb ass like that I guess haha but thanks for the help!


Sent from my iPhone using Tech-Forums
 
Back
Top Bottom