Welcome Guest. Please Login or Register. Apr 1st, 2018, 05:14am
ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018. We apologize Conforums does not have any export functions to migrate data. Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.
Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
Re: Closing MainWin conditionally?
« Reply #3 on: Aug 31st, 2015, 09:54am »
In the end I used the CloseWindow function to minimise the window instead of the DestroyWindow function that kills the program. This is because I wanted to get rid of mainwin but still wanted to display a notice (using the LB "Notice" command). It still shows the window being minimized, but that's okay.
« Last Edit: Aug 31st, 2015, 09:55am by Monkfish »
In the end I used the CloseWindow function to minimise the window instead of the DestroyWindow function that kills the program.
There's no point in calling DestroyWindow, since END has the same effect (in a compiled EXE).
Personally I don't like calling CloseWindow simply because it is misleadingly named (it doesn't close the window). My preference is to call ShowWindow with the SW_MINIMIZE parameter because then it's obvious what you are doing.
Quote:
It still shows the window being minimized, but that's okay.