Recent

Author Topic: Help! Need to keep my program maximized on windows startup  (Read 2820 times)

amimaniac

  • Newbie
  • Posts: 2
Help! Need to keep my program maximized on windows startup
« on: December 20, 2013, 10:37:55 am »
Hi guys,
 I have a little big trouble, I've done a program and it is installed on a computer without mouse/keyboard.
The trouble is that even if I removed every kind of win 7 notifications sometimes it happens that on startup my program runs and after a few frames (0,5 seconds) windows goes in foreground and my program goes minimized on the taskbar.

How can I tell my program to check if it is maximized and if not, maximize it?

thanks,
Roberto

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Help! Need to keep my program maximized on windows startup
« Reply #1 on: December 20, 2013, 02:57:46 pm »
I would not recommend doing this because it prevents minimising the window altogether, and may cause flicker, but it is certainly possible:

Code: [Select]
procedure TForm1.FormWindowStateChange(Sender: TObject);
begin
  if (WindowState=wsMinimized) then
    WindowState:=wsNormal; // or wsMaximized, if that is what you want
end;

Rails

  • Guest
Re: Help! Need to keep my program maximized on windows startup
« Reply #2 on: December 20, 2013, 04:23:29 pm »
How about setting a timer to maximize the window a few seconds after launch.


 

TinyPortal © 2005-2018