From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I programmatically launch IE to open a local .html file?

I would like to create several image intensive webpages to act as help files for the user of my CVI application. A control in the corner of each panel in my uir is a question mark. When the user clicks the question mark I would like an existing .html file on the PC to be opened and displayed in Internet Explorer.

I have reviewed National Instruments "iedemo" sample program, but I wonder if I could accomplish my task without the use of ActiveX.

Thanks!

-Aaron
0 Kudos
Message 1 of 5
(3,598 Views)
The simplest way to do it is to run the system() or the LaunchExectuable() function to launch the browser to display the file.
E.g. (all one line):
LaunchExecutable ("C:\\Program Files\\Internet Explorer\\iexplore.exe d:\\My Documents\\help.html");

system() will wait for the browser to exit before continuing your program; LaunchExecutable() will launch the browser and continue your program (which may be better for a help system).
Message 2 of 5
(3,598 Views)
Thank you Al S, that's exactly what I as looking for!
0 Kudos
Message 3 of 5
(3,598 Views)
Be carrefull however because you may not know what the end user use as web
browser (gozilla, netscape...) so being so specific (I mean running µSoft
IE) may not be always a good idea.You can also use the SDK call
ShellExecute.
To get a working CVI sample project, reach page
http://perso.wanadoo.fr/philippe.baucour/download.html and look for "Launch
Explorer" in the SDK section.
Dowload, run and enjoy (I hope)

--
Philippe
Feel free to visit : http://perso.wanadoo.fr/philippe.baucour



"Aaron T." a écrit dans le message de
news:506500000008000000328A0000-1042324653000@exchange.ni.com...
> I would like to create several image intensive webpages to act as help
> files for the user of my CVI application. A control in the corner of
> each panel in my uir is
a question mark. When the user clicks the
> question mark I would like an existing .html file on the PC to be
> opened and displayed in Internet Explorer.
>
> I have reviewed National Instruments "iedemo" sample program, but I
> wonder if I could accomplish my task without the use of ActiveX.
>
> Thanks!
>
> -Aaron
0 Kudos
Message 4 of 5
(3,598 Views)
Thanks for the additional details for us to consider. In my particular situation, developing software for data acquisition and machine control in a manufacturing plant, I essentially control the end user. I mean that I load the PC and place it in use on the shop floor without the possibility of software I didn't plan for being used.

Thanks for the insight though!
0 Kudos
Message 5 of 5
(3,598 Views)