List Info

Thread: Check if an application is in Minimized mode




Check if an application is in Minimized mode
user name
2006-04-17 09:07:08
Hi all,
  
  In my application, i want to do the checking if an application is in the minimized state, i try
  
  If Main.WindowState = wsMinimized then
    // perform my action here
  else
    // perform another action
  
  But it doesnt seems to works. Anyone can help? Thanks in advance.
  ;
  Regards:
  Ong

           
---------------------------------
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.

[Non-text portions of this message have been removed]

Check if an application is in Minimized mode
user name
2006-04-18 18:44:11
The following code seems to work for me. try this
  
  var
h : pWINDOWPLACEMENT;
begin
   getmem(h,sizeof(h));
   if GetWindowPlacement(application.Handle,h) then // don't give form's handle rather give application handle.
    ; if h.showCmd = SW_SHOWMINIMIZED then
       showmessage('timer');
    freemem(h,sizeof(h));
end;
soonhuat ong <soonhuat81yahoo.com&gt; wrote:
&nbsp; Hi all,
&nbsp; 
  In my application, i want to do the checking if an application is in the minimized state, i try
 &nbsp;
  If Main.WindowState = wsMinimized then
&nbsp; &nbsp; // perform my action here
  else
&nbsp; &nbsp; // perform another action
&nbsp; 
  But it doesnt seems to works. Anyone can help? Thanks in advance.
  ;
  Regards:
  Ong

&nbsp; &nbsp; &nbsp;   ; &nbsp; 
---------------------------------
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.

[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: delphi-en-unsubscribe@yahoogroups.com


&nbsp; &nbsp;
---------------------------------
  YAHOO! GROUPS LINKS

   ;
 &nbsp;  Visit your group "delphi-en" on the web.
&nbsp; &nbsp;
 &nbsp;  To unsubscribe from this group, send an email to:
delphi-en-unsubscribe@yahoogroups.com
&nbsp; &nbsp;
 &nbsp;  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

   ;
---------------------------------
 



&nbsp; &nbsp;    &nbsp; &nbsp; 
---------------------------------
Love cheap thrills? Enjoy PC-to-Phone  calls to 30+ countries for just 2¢/min with Yahoo! Messenger with Voice.

[Non-text portions of this message have been removed]



[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )