View Single Post
Old May 11th, 2006, 1:03 PM   #7
Booooze
Expert Programmer
 
Booooze's Avatar
 
Join Date: Mar 2006
Location: Igloo
Posts: 710
Rep Power: 3 Booooze is on a distinguished road
Send a message via MSN to Booooze
Thanks for the replys guys.

@Jason- Yeah, I realised this after the fact. I probabyl could have done it your way. It was last night so I hadn't thought about it yet, but since I just started throwing some more code in the public frmMain, I realised I probably could have done the form work in there too. Thanks for the reply. Much appreciated.

@Kilo- I'm not great with overloaded constructors and destructors etc, as I come from a vb6 / some java background. Never really went far with C++, I would have to do some more research to figure it out your way.

I've got it working, and I've used Oobles idea. It seems to be working great, as i just use a conditional statement to figure out which form to load, and if its the frmPassword, it will create a new instance of frmMain, then hide itself. frMain.close contains Application.ExitThread(); as I only want the program to shut down if frmMain is closed. (and if the user decides to cancel becuas ethey can't break the password :p

My only concern now, is which way is most effiecient? Personally, I don't really know. The way I have now seems to work fine. Any thoughts?

Thanks again
Booooze is offline   Reply With Quote