Results 1 to 4 of 4

Thread: [RESOLVED] How to WinWaitActive and WinWaitActivate in VB 2008?

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2007
    Posts
    46

    Resolved [RESOLVED] How to WinWaitActive and WinWaitActivate in VB 2008?

    Is there any way I can have program wait till a specific window to opens up. I used similar function in AutoIt it is called WinWaitActive.

    And, is there any way in VB 2008 that I can activate and bring a specific window in front, WinActivate does that...

    I know the title and text of window that I need to activate and wait for...

    Any ideas???

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: How to WinWaitActive and WinWaitActivate in VB 2008?

    You can use AppActivate, passing the title bar of the window you want to activate.

    Code:
    AppActivate("Untitled - Notepad")
    You can also pass a process ID to AppActivate in the event you don't know its caption.

    If AppActivate is too limited for your needs, you can use a few Win32 API calls like FindWindow and SendMessage to activate a given window.

  3. #3

    Thread Starter
    Member
    Join Date
    Dec 2007
    Posts
    46

    Re: How to WinWaitActive and WinWaitActivate in VB 2008?

    Thanks Kleinma,

    I guess I need much more than AppActivate. I will look into FindWindow and SendMessage Win32 APIs.

    Thanks again.

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [RESOLVED] How to WinWaitActive and WinWaitActivate in VB 2008?

    a really good wiki site for getting VB.NET versions of Win32 API calls is

    www.pinvoke.net

    Also, Jared Parsons, a VB team developer at Microsoft, released a utility app that also helps a ton. Check that out here.

    http://www.codeplex.com/clrinterop

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width