|
-
Jun 27th, 2008, 02:49 PM
#1
Thread Starter
Member
[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???
-
Jun 27th, 2008, 03:58 PM
#2
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.
-
Jul 1st, 2008, 08:20 AM
#3
Thread Starter
Member
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.
-
Jul 1st, 2008, 08:31 AM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|