?
Solved

Extracting Internet Explorer session information from VB

Posted on 2003-10-23
3
Medium Priority
?
276 Views
Last Modified: 2013-12-26
Hi Experts!!!

Just wondering if anyone has any idea of the best way to
1. check if Internet explorer is running from VB (v.6) - I've looked up the environment variables and there isn't an obvious way to check processes to see if "IEXPLORE.EXE" is running.
2. if IE is running, I want to extract the URL to find out where the user is.
3. If IE is NOT running, I want to trigger a new IE session. - I have had a play with the Internet explorer object available in VB, but I need users to toggle between the VB form, and enter info while looking at the explorer window. This object appears to only allow users access to one or the other, not both at the same time.
4. I also want to send users to a particular URL.

It sounds like such a simple process!!! But I have no idea how to go about it...

Thanks for your help!

0
Comment
Question by:tio717
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
TheQuestion earned 1600 total points
ID: 9606284
Code for Seeing if Ie is running :

 http://www.freevbcode.com/ShowCode.ASP?SearchString=dfreeze&ID=3561

To launch if not there:

Private Declare Function ShellExecute Lib _
"shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long

Private Sub URL_Click()

Dim iret As Long

' open URL into the default internet browser

iret = ShellExecute(Me.hwnd, vbNullString, _
"http://www.microsoft.com", vbNullString, _
"c:\", SW_SHOWNORMAL)

End Sub


and im currently searching for the extraction
0
 

Author Comment

by:tio717
ID: 9661504
That little function listed above is so effective! It actually checks if explorer is running, if it is, launches the appropriate URL, and if not, launches a new session! I can't believe how easy that was!

Thankyou!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question