GUI Window Handling Need some help.

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators:Administrator, Global Moderator

Post Reply
BlazeTech
Newbie
Posts:7
Joined:Mon Jun 21, 2004 9:44 pm
Contact:
GUI Window Handling Need some help.

Post by BlazeTech » Mon Jun 21, 2004 9:59 pm

I am making a GUI called GSHELL that DOES INCLUDE MULTITASKING THAT WORKS MR. I love to hack.

I need help with the windowing system though.

1. I can't figure out how to make it so that it only activates the window with the highest Z - Order you clicked because if the mouse is in the area of a window behind the window there is a problem and sometimes it activates the window underneath it. So how can I make it that it knows what window I actualy clicked on.

2. How to make something that you can drag and resize the window with redrawing what was behind it and without flicker.

3. Can I interpet exe's and if so how because I have my of format called .GPR but I wan't to run .exes as well as .GPRs and dos programs.

Please help by answering at least the first 2 questions and the one other question. Let me know if you caught what I just said.
GSHELL will be a GUI, but Blaze Ultimate will be an OS.

User avatar
frankiebaby
Global Moderator
Posts:95
Joined:Tue Apr 30, 2002 1:38 am
Location:Pennsylvania
Contact:

Re: GUI Window Handling Need some help.

Post by frankiebaby » Tue Jun 22, 2004 2:18 am

Multitasked Dos Programs is tricky.

To remove flicker, use an off-screen buffer, an array dimed to the size of the screen, do all your drawing there first. There are many libraries to do this, OR you can use ' WAIT &H3DA, 8 ' to wait for the screen's refresh, so that you only draw between refreshes.

To fix window activation, keep a status indicator that holds which window is active. Only allow widgets (GUI items) on that window to respond to mouse input. If the click is elsewhere, bring that window to focus.

To make windows resizeable, you may have to create a graphics buffer for EACH window, keep the actual screen coordinates of the buffers, and then when a window is moved, closed, or iconified, redraw the whole screen from bottom to top, or break screen into quadrants or areas over several buffers to only update those necessary (MAY increase performance)

hope this is good advice, I try, and best of luck to you

BlazeTech
Newbie
Posts:7
Joined:Mon Jun 21, 2004 9:44 pm
Contact:

Re: GUI Window Handling Need some help.

Post by BlazeTech » Tue Jun 22, 2004 11:13 pm

A 640 by 480 screen is a lot of pixels. Can I store that in an array.
GSHELL will be a GUI, but Blaze Ultimate will be an OS.

User avatar
frankiebaby
Global Moderator
Posts:95
Joined:Tue Apr 30, 2002 1:38 am
Location:Pennsylvania
Contact:

Re: GUI Window Handling Need some help.

Post by frankiebaby » Fri Jun 25, 2004 4:16 am

well, it is possible, i have seen it done. There are libs that give high-res and high color with multiple screen pages. It depends on what color range you are using. check the QB help file for info on data size for that screen mode.

BlazeTech
Newbie
Posts:7
Joined:Mon Jun 21, 2004 9:44 pm
Contact:

Re: GUI Window Handling Need some help.

Post by BlazeTech » Mon Jun 28, 2004 5:55 am

I can't use EMS or XMS to capture or put images because my system keeps freezing everytime I try. It used to work untill one incompatable PRINT Command was called instead of future.PRINT witch should of been used. Now the examples don't even work.
GSHELL will be a GUI, but Blaze Ultimate will be an OS.

Post Reply