How to open just one window?

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

How to open just one window?

Postby Luis Babboni » Jun 20, 2021 1:54

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: 10454
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: How to open just one window?

Postby fxm » Jun 20, 2021 5:09

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: 357
Joined: Mar 15, 2015 12:41

Re: How to open just one window?

Postby Luis Babboni » Jun 20, 2021 9:05

Nice!

Thanks.

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 5 guests