Re: VB6 Restore Minimized Window - External Application

From: Andrew Dunn (andrewd_at_cclXXXmenzies.com)
Date: 10/05/04


Date: Tue, 5 Oct 2004 10:51:38 +0100

Tom

I know the EXE name of the application that I want to call. I have no method
of predicting what the form.caption will be.

I have worked around this problem for now by amending the applications that
will be called so that they write their current caption to a registry key.
My calling program now uses the EXE name to retreive the registry key and
then I can find my window handle.

Knowing the EXE name and knowing that only one copy of the EXE will be
running, given that I can identify the process, is there anyway of finding
out the caption ?

I will look at the FindPart example - though I suspect that I already have
most of the code - i.e. I can already find a partial caption.

Regards

Andrew

"Tom Esh" <tjeshGibberish@earthlink.net> wrote in message
news:nb1rl05e1ncg48sirtp3c4b0uc2dmdip5e@4ax.com...
> On Fri, 1 Oct 2004 11:57:13 +0100, "Andrew Dunn"
> <andrewd@cclXXXmenzies.com> wrote:
> >...
> >I still have a problem because the handle has to be that of the form -
i.e.
> >I am finding the handle by enumming windows, looking for the
form.caption.
> >
> >However I do not know what the caption will be !!! - I only know the
> >application that needs to be brought to the front.
>
> It's not clear exactly what you mean by "know the application". What
> do you know about the app? Exename, proc ID, part of the titlebar
> text, etc?
>
> Maybe have a look at the "FindPart" example at the same site you
> visited earlier: http://www.mvps.org/vb/index2.html
>
>
> -Tom
> MVP - Visual Basic
> (please post replies to the newsgroup)



Relevant Pages

  • Re: How to get application handle name (show in tilte bar) from *.
    ... of window task manager Or Who do Window task Manager work when be execute ... any .exe and puuting value in Application and Processes tab? ... > processes and finding the caption using GetWindowText. ...
    (microsoft.public.vc.mfc)
  • Re: App.ExeName is not what it should be
    ... But it should return the actual exe name when you are running the compiled exe, and the exe name is the name you entered into to the FileName box when using the IDE File / Make menu. ... If you place a Command Button on your Form to write App.ExeName to the Form's caption property and if you use File / Make to compile your project to an executable and save the compiled exe to the desktop using the name "mytestprog.exe" do you see the exe file as an icon on your desktop and is that icon called "mytestprog.exe"? ... and if you then run the exe and then click the button does the Form's caption say something other than "mytestprog"? ...
    (microsoft.public.vb.general.discussion)
  • Re: Determine frame caption color?
    ... As I said, though, here I have the default Vista theme enabled and that caption color sure looks black to me. ... If you build an exe, and have a manifest, and initialize the controls correctly, your exe can also show the XP Style, with the blue frame caption. ...
    (microsoft.public.vb.general.discussion)
  • Re: How to get Excel / Word (MS-Office) Version ?
    ... I'd stick with trying to instantiate Excel, ... Knowing the exe is on the machine is, ... most simple and easy way except for the finding of the exe file. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Open Source vs. Commercial
    ... > As far as my knowledge, I'd say it is just barely beyond knowing enough to ... > dangerous (meaning I realize how much I don't know) in both areas. ... Download Blackbird Crow Raven's book ...
    (borland.public.delphi.non-technical)