LB Booster
Programming >> Liberty BASIC language >> Leave mainwin open, then how do I close it from GU
http://lbb.conforums.com/index.cgi?board=lblang&action=display&num=1430390371

Leave mainwin open, then how do I close it from GU
Post by RNBW on Apr 30th, 2015, 10:39am

Although using GUI, I would like to leave the mainwin open, so that text can be directed to it, which will show exactly what will be printed out hard copy.

Easy to do. Don't include nomainwin.

What I would like to do is to close down the main win when I close the GUI program.

I have looked at LB and there is a solution in NewsDesk #53, but this was written with Windows 95 in mind and gives an error in Windows 8.
Re: Leave mainwin open, then how do I close it fro
Post by Richard Russell on Apr 30th, 2015, 2:50pm

on Apr 30th, 2015, 10:39am, RNBW wrote:
What I would like to do is to close down the main win when I close the GUI program.

I think you'll find that happens automatically in a compiled program (i.e. an EXE). If you execute the END statement it will close the mainwin.

It's only when running in the IDE, when the mainwin is intended to be used principally as a debugging aid, that it remains open even after an END statement.

So you shouldn't need to do anything at all.

Richard.

Re: Leave mainwin open, then how do I close it fro
Post by RNBW on Apr 30th, 2015, 4:14pm

Absolutely correct! It just shows how long ago I made an executable.

Thanks very much. It works a treat!

Ray grin