Solved

Extracting Internet Explorer session information from VB

Posted on 2003-10-23
3
272 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

831 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