Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to create a full screen form without auto-hiding the Windows Taskbar Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
02-Oct-02
Category
VCL-Forms
Language
Delphi 2.x
Views
100
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Jonas Bilinkevicius

How do I set my form to display in full screen? No title bar, no borders, and it 
goes over the task bar (not by setting the task bar to "Auto Hide").

Answer:

Emulating full screen mode:

private {in form declaration}
1   
2   procedure WMGetMinMaxInfo(var msg: TWMGetMinMaxInfo); message WM_GETMINMAXINFO;
3   
4   procedure TForm1.WMGetMinMaxInfo(var msg: TWMGetMinMaxInfo);
5   begin
6     inherited;
7     with msg.MinMaxInfo^.ptMaxTrackSize do
8     begin
9       X := GetDeviceCaps(Canvas.handle, HORZRES) + (Width - ClientWidth);
10      Y := GetDeviceCaps(Canvas.handle, VERTRES) + (Height - ClientHeight);
11    end;
12  end;
13  
14  procedure TForm1.Button2Click(Sender: TObject);
15  const
16    Rect: TRect = (Left: 0; Top: 0; Right: 0; Bottom: 0);
17    FullScreen: Boolean = False;
18  begin
19    FullScreen := not FullScreen;
20    if FullScreen then
21    begin
22      Rect := BoundsRect;
23      SetBounds(Left - ClientOrigin.X, Top - ClientOrigin.Y,
24        GetDeviceCaps(Canvas.handle, HORZRES)
25        + (Width - ClientWidth), GetDeviceCaps(Canvas.handle, VERTRES) + (Height -
26        ClientHeight));
27      {Label2.caption := IntToStr(GetDeviceCaps( Canvas.handle, VERTRES ));}
28    end
29    else
30      BoundsRect := Rect;
31  end;


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC