Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting window handle

Status
Not open for further replies.

RandyRiegel

Programmer
Sep 29, 2003
256
US
Is there a way in .net to get a window handle or do I still need to use an API call? I'm need to determine if a window with a certain name exists and if it does activate it and send keystrokes to it. I've done similar in VB6 with API but figued 2005 had some better way to do it.

Randy
 
Every form has a handle. Just type form1.handle in the code editor and you will see it. It's of the type intptr.

Christiaan Baes
Belgium

"My new site" - Me
 
I mean the handle of anothe window (non-VB related) such as notepad, etc.

Randy
 
Look at process and processes it will give you the handle of a certain process. However, if that process has mulitple windows it will only show give one handle.

Christiaan Baes
Belgium

"My new site" - Me
 
Well, back to the drawing board. The window I'm looking for is created by Firefox. It's a login for our corporate firewall. I can only see the main Firefox process not the other windows.

Is there a way of going though every window no matter how they are started?

Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top