Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Full Screen works: A bug or a feature?

Status
Not open for further replies.

Leonix

IS-IT--Management
Apr 18, 2003
17
0
0
IT
With a bit of luck I've done a "Full Screen" Form... Here's the recipe:
1. Make a New Form ;
2. Set to "false" all "BorderIcons";
3. Set the "FormStyle" to "fsStayOnTop";
4. Set the "BorderStyle" to "bsNone";
5. Put a Button in the form and put the following code in the OnClick event of the Button:

Code:
int h, w;
w = GetSystemMetrics(SM_CXMAXIMIZED);
h = GetSystemMetrics(SM_CYMAXIMIZED);
Width = w;
Height = h;
Left = -4;
Top = -4;
WindowState = wsMaximized;

Ok. Run the app and press the Button... If you hit again the Button the Form appears only Maximized but not Full Screen... I've a BCB 6... This is bug of a feature? [infinity]


Leonardo Mattioli
Chief Program Manager
Z Forge snc -
 
I'm using BCB 6 and it works correctly. You can also write code below to do it.

int h, w;
w = Screen->Width;
h = Screen->Height;
Width = w;
Height = h;
Left = 0;
Top = 0;
WindowState = wsMaximized;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top