I’m starting a new database project to learn FF and SQLitening and was wondering where to put my startup code for opening a database connection. Should I have a module with a “FUNCTION PBMAIN†for startup code or should I just put the code in WM_CREATE in the startup form for the project? It seems best practice would be to put the code in a module. What if the simple project really only has one main form, would this make a difference?
Thanks,
Tony
FF_WINMAIN
(found under "Special Functions" in the Project Explorer)
I keep forgetting about the "Special Functions"
Thanks
If I'm not mistaking, FF_WINMAIN is the main entry of your program.
In general, I have atleast one form in my projects, so I make a habit of doing all my init stuff in WM_CREATE (of any form).
All the cleaning up I do in WM_DESTROY (saving the forms size and position, saving control contents, etc.).
In the rare case that you do not have a form, you need to do everything in FF_WINMAIN.