MedVision ad

Vb6 question. (2 Viewers)

HellVeN

Banned
Joined
Jun 26, 2004
Messages
532
Gender
Male
HSC
2005
I have this program which i'm making and I want to implement a "New Game" feature in it. Goto does not seem to work so how else could i do it? What i need to do is when "New game" is clicked, the run time goes back to Form_Load().

Ideas?
 

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
Call Form_Load();


or you can stick your code in form load in a new sub routine, and invoke it on form load and call it for the New Game.
 

HellVeN

Banned
Joined
Jun 26, 2004
Messages
532
Gender
Male
HSC
2005
Ahh Thank you. The first thing did the trick :). Im such a noob.
 

Fosweb

I could be your Doctor...
Joined
Jun 20, 2003
Messages
594
Location
UNSW. Still.
Gender
Male
HSC
2003
Hrmm.
Goto = the devil.

When you get to documentation phase, try doing a flowchart or algorithm for routines with Gotos in them.

I.e. dont use goto.
 

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
Fosweb said:
Hrmm.
Goto = the devil.

When you get to documentation phase, try doing a flowchart or algorithm for routines with Gotos in them.

I.e. dont use goto.
Yeah i remember i read about GoTo statements, and the problem was, GoTo statements, generally don't return control back to the caller, like once it's finish processing it's statements, i thin, i forgot haha i remember reading it back a while.
 

raymes

Member
Joined
Jan 21, 2004
Messages
116
Location
Sydney
Gender
Male
HSC
2004
its not just that - they defeat the whole purpose of modular programming
 

Users Who Are Viewing This Thread (Users: 0, Guests: 2)

Top