Re: Testing for an executing application, and switiching to it

From: Marc Rohloff (marc)
Date: 10/15/03


Date: Wed, 15 Oct 2003 09:41:07 -0400


> Your instructions were clear and it's not obvious to me what I'm
> doing wrong. I have D7P, WinXP Pro SP1 & Word2K.
  WordApplication1.Connect;
  WordApplication1.Visible := true;
  WordApplication1.Activate;
  if WordApplication1.WindowState = wdWindowStateMinimize
    then WordApplication1.WindowState := wdWindowStateNormal;

The advantage of this solution over Deborah's (no offense intended) is
that I can see your client's adding requirements like 'and open a new
document' which is hard to implement her way.
 
> Deborah's suggestion returns a handle for Word, I just need to find
> a way to test the state of the application hanging off that handle
> and restoring it if it's minimised.

ShowWindow(handle, SW_RESTORE);

Marc



Relevant Pages

  • Re: Restored Exchange, cant replay logs because no Restore.env
    ... No, there is no other server involved, but that article was recommended to ... me as instructions on restoring the information store. ... the instructions claim that there's supposed to be a file ...
    (microsoft.public.exchange.admin)
  • Re: Restored Exchange, cant replay logs because no Restore.env
    ... No, there is no other server involved, but that article was recommended to ... me as instructions on restoring the information store. ... the instructions claim that there's supposed to be a file ...
    (microsoft.public.exchange2000.admin)
  • Re: XP Running slow
    ... > Try this before restoring: ... > Please see the following instructions. ... > (Links to online virus scans on the same page) ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: Exchange restore help please
    ... Restoring the Information ... Store is something I never want to repeat. ... The MS instructions as to what ...
    (microsoft.public.windows.server.sbs)
  • Re: least expensive island smokes these days?
    ... >> instructions for 5 cases of the Syrah. ... Prev by Date: ...
    (alt.smokers.cigars)