• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 201
  • Last Modified:

How can I make my form streach over all the screen?

Hi guys....
How can I make my form streach over all the screen?
also over taskbar like games .

thanks
0
peruzzi
Asked:
peruzzi
1 Solution
 
shaneholmesCommented:
set the form windowstate property  to wsmaximized & BorderStyle to "bsNone"


procedure TForm1.FormCreate(Sender: TObject);
var
 TaskBar: HWND;
Begin
 TaskBar := FindWindow('Shell_TrayWnd', nil);
ShowWindow(TaskBar, SW_HIDE);
end;

procedure TForm1.FormDestroy(Sender: TObject);
var
 TaskBar: HWND;
Begin
 TaskBar := FindWindow('Shell_TrayWnd', nil);ShowWindow(TaskBar, SW_SHOW);
end;
end.

Shane
0
 
mokuleCommented:
form1.height := screen.height;
form1.width := screen.width;
0
 
shaneholmesCommented:
peruzzi,

I would recommend you  place a temporary button on the form with

Close;

in the OnClick event,

then you can remove he button when your done developing your application
or when you have added an alternative method of exiting the application.

Shane
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
mokuleCommented:
peruzzi
1. If You hide the taskbar like Shane advice there will be no taskbar when You switch from your application to another using Alt+Tab.
2. It is also possible to close your application by Alt+F4
0
 
shaneholmesCommented:
WHen you clsoe the form, you get the task bar back, see my code above

What are you trying to do here mokule?

Shane
0
 
mokuleCommented:
I didn't talk about closing application, but switching to another.
Am I not right?
Excuse me Shane but I don't understand Your question.
0
 
shaneholmesCommented:
Well, if i understand you correctly, you say that with my solution, you can't Alt-Tab to other apps! - and I say you can!

Shane
0
 
mokuleCommented:
No You don't understand me.
I've just said that WHEN You switch the task bar is hidden. Nothing more.
0
 
shaneholmesCommented:
Right, thats correct.....

Shane
0
 
HypoviaxCommented:
Very easy. You don't need to do all this other fancy stuff just set the properties of the form:

- Windowstate - wsmaximised
- BorderStyle - bsnone

And if you want to have it ontop of all programs set

-FormStyle - Fsstayontop

. To bring the program to the top call

formx.bringtofront

Regards,

Hypoviax
0
 
shaneholmesCommented:
Whats makes yours more simple then mokule's

form1.height := screen.height;
form1.width := screen.width;

Shane
0
 
peruzziAuthor Commented:
Hi Guys
thanks for you

peruzzi
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now