Check a solution here:
http://www.experts-exchang
Main Topics
Browse All TopicsHi ,
I have a program that should run maximised at all times.
I have removed the minimise buttons but users can still minimise the program by clicking the "show desktop" shortcut or clicking windows+M key.
Is there any way to prevent the program from getting minimised
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Check a solution here:
http://www.experts-exchang
one solution (but i don't like it) is this...
Stick a timer on the form, and then go...
(every couple of seconds or once when you first run it) //timer.interval
If (IsIconic(Form1.Handle)=Tr
Begin
ShowWindow(Form1.Handle,SW
SetForegroundWindow(Form1.
End;
just a normal timer from the menu and stick the code in and run.
procedure TForm1.Timer1Timer(Sender:
begin
If (IsIconic(Form1.Handle)=Tr
Begin
ShowWindow(Form1.Handle,SW
SetForegroundWindow(Form1.
End;
end;
Although a hook would be a good idea, capture the even that gets posted as it minizes then pull the code up to bring it back... but a word of warning i just noticed a strange side effect here of windowx XP once it get's brought up again, you can't minimize it again! lol
Capturing the WM_SYSCOMMAND does not prevent Win+D from working on a window.
What you have to do is capture the WM_WINDOWPOSCHANGING messge because that
is what is sent when "Show Desktop" is done.
Seems that these flags are being set when it is done:
SWP_NOSIZE, SWP_NOMOVE, SWP_NOZORDER, SWP_NOACTIVATE, SWP_SHOWWINDOW
Not sure how to do to prevent it, though, I'm testing some code now.
This code will prevent minimizing from windows + D or clicking on the show desktop. The application always stay on top
Set Form1 Properties in the object inspector to
Border Icons biMinimize = False
formstyle = stay on top
procedure TForm1.FormShow(Sender: TObject);
begin
setwindowlong(getwindow(se
setwindowlong(getwindow(se
self.OnShow:=nil;
end;
Hope this helps you to solve your problem!!
sun4sunday
Business Accounts
Answer for Membership
by: kaslaPosted on 2005-10-04 at 03:42:30ID: 15012706
you can find several solutions as respond to similar question on this page /threads/t hread.cfm? ID=26844& G =26844
http://www.delphipages.com
(read all replys)