Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 launching html from VB

views
     
TSAthono
post Mar 1 2006, 09:17 PM, updated 20y ago

Getting Started
**
Junior Member
227 posts

Joined: Dec 2005
I need a little help.

I have added a button to my VB program to launch an IE window. It works fine but in order to make it work I put the file out on the internet and I call it there.

How would I do it locally?
naim_mahmood
post Mar 2 2006, 07:21 AM

Getting Started
**
Junior Member
105 posts

Joined: Jul 2005


QUOTE(Athono @ Mar 1 2006, 09:17 PM)
I need a little help.

I have added a button to my VB program to launch an IE window.  It works fine but in order to make it work I put the file out on the internet and I call it there.

How would I do it locally?
*
not really get it what's your problem.... blink.gif
anthony_yio
post Mar 2 2006, 08:11 PM

........
Group Icon
Elite
1,828 posts

Joined: Jan 2003


QUOTE(Athono @ Mar 1 2006, 09:17 PM)
I need a little help.

I have added a button to my VB program to launch an IE window.  It works fine but in order to make it work I put the file out on the internet and I call it there.

How would I do it locally?
*
Put the HTML file locally?




TSAthono
post Mar 8 2006, 02:45 AM

Getting Started
**
Junior Member
227 posts

Joined: Dec 2005
Here is what I am doing.

When the user clicks on the help button in my Visual Basic Application, I call this function:

ShellExecute 0, "Open", "www.gelsana.com/Dmm_Ri4152A_BETA/Vendor/Doc/m4152a.pdf", 0, 0, SW_SHOWNORMAL

But that means I have the pdf file out on the internet. I want it to be on their comuter when they lanuch ShellExecute
SincerePrayer
post Mar 8 2006, 09:20 AM

love to pray
Group Icon
Elite
1,120 posts

Joined: Jun 2005
Athono,


The ShellExecute API is act like the double click and some context menu operation (eg: Edit, View & etc) on the particular file. For you to open PDF file locally, instead of pointing to URL, you can point it to a local file.


Happy Coding smile.gif
anthony_yio
post Mar 8 2006, 10:22 AM

........
Group Icon
Elite
1,828 posts

Joined: Jan 2003


QUOTE(Athono @ Mar 8 2006, 02:45 AM)
Here is what I am doing.

When the user clicks on the help button in my Visual Basic Application, I call this function:

ShellExecute 0, "Open", "www.gelsana.com/Dmm_Ri4152A_BETA/Vendor/Doc/m4152a.pdf", 0, 0, SW_SHOWNORMAL

But that means I have the pdf file out on the internet.  I want it to be on their comuter when they lanuch ShellExecute
*
then, just enclose the pdf in your application and call it there?

ShellExecute 0, "Open", "./m4152a.pdf", 0, 0, SW_SHOWNORMAL

if you place the m4152a.pdf in the same folder with your application.

Anyway, I believe IE will download the file into the cache. Technically, it is still accessing the local one.

By the way, beside using ShellExecute, you can also use CreateProcess which offer more control. You can even use VBA for Acrobat, like this one.

http://www.igetit.net/SampleCode/Adobe_Acrobat_vba_code.asp

TSAthono
post Mar 10 2006, 11:01 AM

Getting Started
**
Junior Member
227 posts

Joined: Dec 2005
Thanks, all.

 

Change to:
| Lo-Fi Version
0.0206sec    1.55    5 queries    GZIP Disabled
Time is now: 23rd December 2025 - 01:13 PM