Click to See Complete Forum and Search --> : execute .exe file in the HTML file
cassandra
Nov 23rd, 2000, 12:22 AM
I need to run an application (.exe file) written using VB when a page is load..( meaning in the HTML file). Pls help.
Danial
Nov 23rd, 2000, 10:16 AM
Hi,
I hate to tell u this, but for security reason client side JavaScript/VB Script isnt allowed to excute any files on the client system.
HarryW
Nov 23rd, 2000, 12:51 PM
Perhaps you could write a control to use in the browser that could call your exe, or maybe even make your exe a control.
cassandra
Nov 24th, 2000, 12:05 AM
can u pls explain how should i write a control to use in the browser that could call your exe, or maybe even make your exe a control ?
Danial
Nov 24th, 2000, 04:20 PM
Hi,
You can create the control in VB as an ocx and embed it in vb.
Check this
http://members.tripod.com/datique/ocx/Project1.HTM
The Source is here
http://members.tripod.com/datique/ocx/Project1.zip
If you want more information on how to create ActiveX control then check out the VBWorld ActiveX Section
http://www.vb-world.net/activex/
Hope this helps
JoshT
Nov 27th, 2000, 11:31 AM
Note that ActiveX controls rely on the browser being IE, and it will pop up a security message allowing the user to refuse to download it.
Josh
cassandra
Nov 28th, 2000, 08:19 AM
I have create an ActiveX control can anyone advice me on how should i go about creating a webpage that contains the ActiveX control. Thanks
JoshT
Nov 28th, 2000, 02:35 PM
VB should be able to automatically make a web page container for your ActiveX control. If not, open your favorite web page editor and see if there is a choice for inserting the ActiveX control.
Also, here's some VERY ROUGH code I had handy:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<BODY>
<OBJECT
classid=clsid:8B5FC689-93B9-11D4-A0E7-005004D0A9E3 name=sh>
</OBJECT>
<script language=vbscript>
sh.exShell "C:\Program Files\Microsoft Office\Office\Msaccess.exe", "d:\data\current.mdb"
</script>
</BODY>
</HTML>
Josh
Danial
Nov 28th, 2000, 07:37 PM
Hi Cassandra,
If you want to embed an custom made ActiveX control on a web page use the "Package & Deployment Wizard" which comes with VB.
Run the P&D, Browse and find your project, Click on the Package button, click next, Choose the "Internet Package", and you need to click next few more times before the wizard creates the neccessary HTML files for you to upload.
The reason you need the P&D is because you need the CLASSID which is a unique ID assigned by VB when you compile the project. Using this classid u can embed this ActiveX control in any HTML Page.
Hope this helps.
Tip:(Taken from VB-World (http://www.vb-world.net/activex/controls5/index3.html))
Every time you compile your control, Visual Basic creates a new class ID for it. That means you have to modify your HTML code everytime you compile your project.
You can fix this problem by clicking on Project, Properties, 'Component' tab and in the Version Compatibility frame, select 'Binary Compatibility' and choose your freshly compiled OCX file.
cassandra
Nov 29th, 2000, 07:04 AM
I encounter error when "Packaging" the ActiveX document. Below is the error message pls help.
Missing Dependency Information
XL5EN32.OLB c:\program files\microsoft office\office
cassandra
Nov 29th, 2000, 07:29 AM
Sorry i am referring to ActiveX control.
Danial
Nov 29th, 2000, 03:35 PM
I have both of these files, if u want i can mail them to u.
cassandra
Nov 29th, 2000, 11:23 PM
Ok thanks. My email address is limbeehar77@yahoo.com..
cassandra
Nov 30th, 2000, 02:32 AM
I have already Package my project, so what should i do next. Also where can i get/read the Classid and how should i insert it into the HTML page. Pls advice.
Danial
Nov 30th, 2000, 06:19 AM
Hi Cassandra,
As i said in my earlier reply, once you have fishised the project you need to use the Package & Deployment wizard to Pacakage it. Make sure you choose "Internet Package" type.
The P&D will create the HTML file which will contain the CLASS ID. Once the P&D crates the HTML file you can copy the the HTML code and paste it to your HTML page.
Hope this helps.
cassandra
Nov 30th, 2000, 11:12 PM
Ok i got this.. thanks. Anyway i have tried and it is successful.. But currently i still encounter missing file (Autmgr32.exe) Pls help.. I encountered this problem when trying to package the ActiveX Document..
cassandra
Dec 1st, 2000, 12:10 AM
BTW I also need to create a webpage for the control so that other people can see the data.. Pls advice.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.