How to open just one window?

New to FreeBASIC? Post your questions here.
Post Reply
Luis Babboni
Posts: 375
Joined: Mar 15, 2015 12:41

How to open just one window?

Post by Luis Babboni »

Hi, I bother you again.

I compile my program as Windows Console and then there are opening two windows:
-One completely in black
-One with my program.
When I want to quit my program, I need to quit the black window.

I tried compiling as Windows GUI and then the are opening just one window:
-One with my program.
But when I need to quit my program, I need to do it via Ctrl+Alt+Del + end process :-(

Any help to could open just one window with my program and quit it via this windows itself?

Thanks!
fxm
Moderator
Posts: 12081
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: How to open just one window?

Post by fxm »

Quit program by using the close button (top and right) of the graphics window (detecting the Chr(255) & "k" string) :

Code: Select all

Screen 12
Do
    If Inkey = Chr(255) & "k" Then Exit Do
    Sleep 10
Loop
(see SCREEN (GRAPHICS), paragraph 'Other details')
Luis Babboni
Posts: 375
Joined: Mar 15, 2015 12:41

Re: How to open just one window?

Post by Luis Babboni »

Nice!

Thanks.
Post Reply