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 <[EMAIL PROTECTED]> wrote:
  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]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 


    
---------------------------------
  YAHOO! GROUPS LINKS 

    
    Visit your group "delphi-en" on the web.
    
    To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
    
    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 

    
---------------------------------
  



                
---------------------------------
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]





-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to