Full-Screen 
Author Message
 Full-Screen

Hi!
How do I make a window cover the whole Screen...not just maximized?!

Thanks:
  Richard W. Peterson



Wed, 18 Jun 1902 08:00:00 GMT  
 Full-Screen


Quote:

>Hi!
>How do I make a window cover the whole Screen...not just maximized?!

>Thanks:
>  Richard W. Peterson


Quote:

>Hi!
>How do I make a window cover the whole Screen...not just maximized?!

>Thanks:
>  Richard W. Peterson

Assuming that you use TPW or BPW, I must tell you that I don't know that
much about writing a Windows program from scratch in those environments
(I'm using Delphi myself), but I did read quite a lot of background info
on the structure of a Windows program. The following is what I can
remember about setting a window to full screen.

In the constructor of your main window you set the dimensions of that
window. If you want a full screen window you need to set the x, y (top
left) and w, h (width and height) of the window so that the borders are
just off screen. Depending on how the user of your program has set up his
screen within Windows (resolution, title bar height, menu bar height and  
borderwidth in pixels) you can calculate the required dimensions.

Use the API call GetSystemMetrics(x), where x is an integer that
represents the dimension you want to retrieve, to collect that info. See
the help file for an explanation of GetSystemMetrics.

Perhaps the following example will make things clear:
Suppose you have retrieved the following with GetSystemMetrics
screen resolution= 800 x 600 pixels
borderwidth= 3 pixels
caption bar height= 20 pixels (I thought this was a typical value)
menu bar height= 18 pixels

Correct me if I'm wrong, but I thought that if you define a Window in the
constructor, w (width) stands for the width of the clientarea + 2x
borderwidth, and h for the height of the clientarea + 2x borderwidth
without caption bar height and without menu bar height.

To get a full screen window with our data you would get
x:= 0 - borderwidth  {-3 in this case}
y:= 0 - borderwidth  {-3}
w:= 2*borderwidth + fullscreen_xdimension {2*3 + 800}
h:= 2*borderwidth + fullscreen_ydimension - captionbar_height -                                                                
                          menubar_height {2*3 + 600 - 20 - 18}

Now, I'm not sure about caption bar and menu bar accounted for in the h
of the window, but this got to be mentioned somewhere in the help file.
If necessary, change the expression for h accordingly.

Anyway, I'm sure you got the idea how to set up the window in your
constructor.

--
       __ ___    __  __ ______
      / //   |  / / / // ____/          Jaap van Heemst

/ /_/ // ___ |/ __  // /___        
\____//_/  |_|_/ /_//_____/    



Wed, 18 Jun 1902 08:00:00 GMT  
 Full-Screen

Quote:

>Hi!
>How do I make a window cover the whole Screen...not just maximized?!

Alt-enter

Quote:
>Thanks:
>  Richard W. Peterson




Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Help: MS-DOS Screen Capture (in Full-Screen Mode) Under Win 95/98/NT

2. Full Screen

3. Need a (very) fast write-routine for the full screen

4. Full Screen Editor

5. Set full screen in a dos command shell under win98

6. Forcing a Window to Full Screen

7. Problem with full screen window

8. Forcing a Window to full screen

9. Problem with full screen window

10. Forcing Mplayer to play AVI-s full screen

11. how code the full screen editor?

12. Detecting window or fullscreen mode on W95 or NT

 

 
Powered by phpBB® Forum Software