Solved

Extracting Internet Explorer session information from VB

Posted on 2003-10-23
3
271 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
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
TheQuestion earned 400 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
 
LVL 3

Expert Comment

by:TheQuestion
ID: 9606299
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ms access #TYPE! error on report when no data 4 67
Validating VB6 Function 19 56
How to debug this code 7 56
Excel VBA, find a string in a column, update a cell 7 67
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

896 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now