Question vb Buttons help

StarKiller512

Member
Joined
Nov 15, 2012
Messages
13
Programming Experience
1-3
Hi. i'm been doing computing for almost two years and for my coursework i am doing a game for educational purposes but i've run across a problem

I have made a login screen for the users who can create a profile and logon to their profile. When they do login they will be greeted with a message box saying 'login successful'. What i want it to do is, when they click on ok i want it to take them to the start up screen but i dont know how to do that. i was think doing an If statement. something like 'If button.clicked= true then frm_startUp.show. is this the right way or is there a better way?
 
Not sure I am understanding you correctly here. I thought you had 24 forms to chose 10 from? In your code, you have only listed 10 forms to chose from so you will always get the same 10.

Also, you are using the Rnd Function but you will always get the same sequence unless you use the Randomize() statement beforehand.
 
Not sure I am understanding you correctly here. I thought you had 24 forms to chose 10 from? In your code, you have only listed 10 forms to chose from so you will always get the same 10.

Also, you are using the Rnd Function but you will always get the same sequence unless you use the Randomize() statement beforehand.
Actually he should be using the System.Random class (Random Class (System)) to get random numbers.
 
I suggested that to him earlier in the thread but as he went his own route I thought i would let him make his own decision.
Understood, I haven't read the whole thread.
Scanning through some of the posts here I see this thread is a month old (still active) for an issue that would take 5 minutes to resolve if he would just post the full code for what he's trying to do. Kudos to you for not giving up on him.
 
the reason why i had ten forms was to make sure it would go the ending form. i initially made 10 but i will be making 24 forms. This thread was initially about starting up the game but its turned into a sort of bug report/q&a session, so sorry about that. if i wanted to post the full code i would have to post the code for all of my forms seeing as one of the variables is included in form6 onwards
 
Back
Top