Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I call an Internet Explorer in VB 1

Status
Not open for further replies.

kenzai

Programmer
Aug 23, 2003
32
0
0
PH
I created a help file in a web page.. I want to call it in VB how can i open this file with VB?

Succeess is never final and failure is never fatal. It's Courage that counts.
 
ShellExecute

I was standing in the park, wondering why frisbees got bigger as they came closer... then it hit me!
 
Here is how I use ShellExecute to call the default browser and open a specific web page. In a module declare the API,

Code:
Public 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

Then, where you need it, place the code to use ShellExecute,

Code:
   Dim l_lngRetVal As Long
   Const SW_SHOWNORMAL = 1

   l_lngRetVal = ShellExecute(0&, vbNullString, "[URL unfurl="true"]www.google.com",[/URL] vbNullString, "C:\", SW_SHOWNORMAL)

Replace ' with your URL.


Take Care,

zemp

"Show me someone with both feet on the ground and I will show you someone who can't put their pants on."
 
Ok....that works..

But I have another question.... wat is better way of making a help file... CHM or a web page file....

if you answered CHM how can I create one?

tnx.......

Succeess is never final and failure is never fatal. It's Courage that counts.
 
Making CHM files and associated HTML stuff - look in faq222-2088 and faq222-1111

There may be some useful info there

Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
As Matt said.

Take Care,

zemp

"Show me someone with both feet on the ground and I will show you someone who can't put their pants on."
 
If you set a reference to Microsoft Internet Controls (SHDOCVW.dll) you can instantiate an InternetExplorer object like so:

Dim obj As InternetExplorer
Set obj = CreateObject("InternetExplorer.Application")

You can then use the Navigate method to call either HTML or ASP files.

Good Luck!

Have a great day!

j2consulting@yahoo.com
 
thnks guys...you're all a big help...thnx....

Succeess is never final and failure is never fatal. It's Courage that counts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top