Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9
This is the forum to discuss the Wrox book Professional ASP.NET 2.0 Special Edition by Bill Evjen, Scott Hanselman, Devin Rader, Farhan Muhammad, Srinivasa Sivakumar; ISBN: 9780470041789
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 29th, 2013, 10:57 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jan 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default vb6 createprocess iexplore and threadid to check status

I need immediate help to launch iexplore using CreateProcess, then through next command button pinfo.dwThreadId to find Active or not

VB form has 3 command buttons

first command button
lngRetValue = CreateProcess(vbNullString, "c:\program files (x86)\internet explorer\iexplore.exe", sec1, sec2, False, pclass, 0&, "C:\", sinfo, pinfo)
hnd = pinfo.dwThreadId

It launching a new iexplore only when existing iexplore is there and I'm getting dwthreadid but when I transfer hwnd to threadid always shows same wrong id.
ThreadID = hnd
lhWnd = FindWindowEx(AddressOf EnumThreadWndActive, lhWnd, "IEFrame", vbNullString)
pid = GetWindowThreadProcessId(hwnd, lpId)

and tried with below code also

If GetWindowThreadProcessId(lhWnd, tId) <> 0 Then 'Get the window's thread id
If tId = pid Then InstanceToWnd = hwnd: ' If pid matches then exit
End If

Expected the foll.functionality:
I wanted to open iexplore and when ever ipress the button next next iexplore should be open with different threadid using createprocess.

In next command button based on that threadid I wanted to check whether iexplore window is active or not and another 3rd command button to close the particular Active iexplore based on threadid.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help!! on Checkbox click how to check from database whether clicked check match. damandeep BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 March 14th, 2011 08:39 AM
check online/offline status sophia BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 5 January 15th, 2010 12:56 PM
How to check a file status? tinywizard Visual Basic 2005 Basics 1 August 6th, 2008 09:07 AM
Connect to VSS check-in Check-out Programatically rhd110 General .NET 6 August 12th, 2007 07:46 AM
How to check if an xml has data set in vb6? method Pro VB 6 0 May 9th, 2007 10:44 AM

All times are GMT -4. The time now is 07:32 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.