Mirage Source
Open form on first run - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: Open form on first run (/showthread.php?tid=2353)



Open form on first run - Nean - 07-11-2008

So I've googled the shit out of this, but to no avail. I've been looking for a code, that will allow me to set events and whatnot to happen on the first run of a program. So for example, I make a program, on first run frmabout pops up with the controls, etc, etc. Any clue if this is possible?


Re: Open form on first run - DarkX - 07-11-2008

Umm you could have frmMainMenu come up and have in the code Form_Load(or add form_load)
Code:
frmAbout.visible = true
or something like that and have a close button on it.


Re: Open form on first run - Rian - 07-11-2008

Well, I dunno if you use a client side setup.ini file, but that's how I'd do it since I already use one to store options and the userame and password.

In the Setup.ini you could have something like:

FirstRun=Yes
or
FirstRun=1

Then check the ini for that value, If it's yes (or 1) then open the new form, then write to the ini "No" or 0 to prevent the form from popping up after that.


Re: Open form on first run - Nean - 07-11-2008

Sonire Wrote:Well, I dunno if you use a client side setup.ini file, but that's how I'd do it since I already use one to store options and the userame and password.

In the Setup.ini you could have something like:

FirstRun=Yes
or
FirstRun=1

Then check the ini for that value, If it's yes (or 1) then open the new form, then write to the ini "No" or 0 to prevent the form from popping up after that.

Thanks Sonire Smile, I think I'll do something like that. Also thanks for the answer DarkX, just not what I was looking for. =]