Wrox Programmer Forums
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 29th, 2013, 10:57 AM
Registered User
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.

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

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