• Steam recently changed the default privacy settings for all users. This may impact tracking. Ensure your profile has the correct settings by following the guide on our forums.

Visual Basic help

androidkaita

Drop The Gun
Hey guys,

I have a project in visual basic. I need to make a menu system, where it starts out as a welcome screen, with a drop down menu, a next, and quit button. What I need help with is extremely simple, and will probably seem ridiculous. I just need to know how to make the menu, when "next" is clicked, to go to the same looking menu, but with a new textbox, and a different drop down menu.

So basically, I just need to know how to make the "next" button load a new frame, like I dont want it to be a pop up menu, I want it to look like it would if you were installing a program, and click next. I also need to know how to get the drop down menu to work eventually, but for now, the next button is my main problem.

This is probably super easy, but thank you so much for the help! And in the meantime, if you have any good recommendations for tutorials that would be great.
 

amrcidiot

MFM Survivor
Hey guys,

I have a project in visual basic. I need to make a menu system, where it starts out as a welcome screen, with a drop down menu, a next, and quit button. What I need help with is extremely simple, and will probably seem ridiculous. I just need to know how to make the menu, when "next" is clicked, to go to the same looking menu, but with a new textbox, and a different drop down menu.

So basically, I just need to know how to make the "next" button load a new frame, like I dont want it to be a pop up menu, I want it to look like it would if you were installing a program, and click next. I also need to know how to get the drop down menu to work eventually, but for now, the next button is my main problem.

This is probably super easy, but thank you so much for the help! And in the meantime, if you have any good recommendations for tutorials that would be great.

If you want to stay on the same screen for real, you can just have a hidden object on screen, and when you click next, replace the other one with it.
It's been over a semester since I've done VB, but he's some basic pseudo code

When next is clicked
txtTextBox.visible = true
(whatever you wanna get rid of here).visible = false

You should set your text box to invisible in the form editor.

Now, if you DO want a completely new screen, I couldn't help you right now, like I said, it's been a while and I've moved on to C++, thus forgetting VB for the time being.

Are you taking this as a class, or just for your free time?
 

androidkaita

Drop The Gun
It's for a class, but the professor said that we kind of have to teach ourselves how to do it, its really frustrating, but thanks for your help I'll try that out.

The problem is that I want the first screen to have a drop down menu, so when you click next, it saves what you said in the drop down menu, then goes to the next window, where a diff drop menu is, and then after that it knows the values of both drop down menus, and builds the next screen based off of that.

Like for example:

first window says how many cars/hour would you like to simulate?

second window says how many parking lot spaces would you like to simulate?

and then after it has these two values it builds the appropriate parking lot and cars/hour.

That's basically our project, and my job is to make the two menu's
 

amrcidiot

MFM Survivor
Well, you can always keep the same menu, but change the text (menu.Text = "akjhdaasdsad") [or something of the like {may be something like menu.Choice, I don't remember}], and just have the information stored into certain int variables.

Otherwise, you may need to just suck it up and keep it all in one menu, if that's a possibility.
Just out of curiosity, which book are you reading? If it's anything like the one I used, or any other good text book, what you want to do will be in the previous chapters or in the future chapters.

You could also do something like creating a second form and having the variables passed to that one, although I don't know how to do it myself, we never got that far. Just look around online or in your book. Anything you want to do is most likely in one of the two places, or both.
 

amrcidiot

MFM Survivor
Wow.
Is this college(Uni) or highschool?

If it's for college, I'd be outraged.
Look for a download of Visual Basic 2008 (Fourth Edition) - Tony Gaddis
It's what I used, and it's pretty straight-forward.
You're most likely going to need to torrent it, but I imagine it won't be too hard to find.
 

Moose

Meta Moose
Are you using VB6 or .NET?

EDIT: Either way, I will do a quick mock-up of what I _think_ you are asking for in VB6 (should be easily converted to .NET). Will post it here later.

EDIT: PM'd you the file. Ask if there's anything you want to know about it. Might not even be what you were asking for, lol.
 

Moose

Meta Moose
It's no problem. =) What drop down menus are you using? If you mean replacing the values of the list items then that can be done in the code of the project I sent you (just replace the values of the parkingSpaces array and carsHR array elements with the values you want and if you are adding more than are already allocated you can change the for loops to accomodate).
 

androidkaita

Drop The Gun
No, I created a menu already, that has just one main menu. In this menu it has like a welcome screen and bs txt, and then it has both ddrop down menus in the same frame. It does not go to a new window like the code you sent me. So what I would like to do is use your variables in those two drop down menus, but in the same window, and then when I click next, to bring up that final window in the project file you gave me that summarizes the users choices.
 

slicer4ever

Coding random shit
Learn to hide your link.

i wasn't trying to hide it, legitly, googling visual basics tutorials can help him, as he said, this is an easy concept, i'd loved to give some actual code help, but i'm not familiar with the VB syntax and language structure to give him code to accomplish what he wants to do, as well, it sounds like his needs were met, also from the sounds of it, he needs to understand more about the concept of logic, then the actual syntax involved, using simple visibility settings, and/or drawing order, as well as array management he can easily accomplish what he wants without even having to change a frame(although i'm not 100%, but does VB actual work in frames like AS?)
 
Top