Re: how to bring an application to front



On Wed, 8 Jun 2005 12:44:14 +0200, "Alessandro" <pippo@xxxxxx> wrote:

>Hello.
>How can I bring to front an other application from my VB application? In
>particular, the other application can have multiple instances opened (for
>example, three different Notepad)
>Thanks in advance.
>Ale
>

Get the hwnd of main window and use SetForegroundWindow. However it
really depends on what you want to do: Bring them ~all~ to the front,
or one in particular? If you want to find a particular instance by
it's caption / doc name, then have at the "FindPart" example on Karl
Peterson's site:
http://vb.mvps.org/samples/


-Tom
MVP - Visual Basic
(please post replies to the newsgroup)
.



Relevant Pages

  • Re: How do I fix this Running Sum query
    ... I believe I answered this in another newsgroup. ... Marsh ... MVP ... Prev by Date: ...
    (microsoft.public.access.queries)
  • Re: Picture Box Question
    ... MVP - Visual Basic ... (please post replies to the newsgroup) ... Prev by Date: ...
    (microsoft.public.vb.general.discussion)
  • Re: GetSysColor
    ... >some special place of the PSDK? ... MVP - Visual Basic ... (please post replies to the newsgroup) ...
    (microsoft.public.vb.winapi)
  • Re: Office 2000/XP
    ... MVP - Microsoft Office ... Please post replies to the newsgroup where all may benefit. ...
    (microsoft.public.office.misc)
  • Re: This is really stupid
    ... MVP - Visual Basic ... (please post replies to the newsgroup) ... Prev by Date: ...
    (microsoft.public.vb.winapi)