PDA

Click to See Complete Forum and Search --> : Start VB program from an HTML link


sterko
May 9th, 2001, 05:00 PM
Hi everybody,
I am a novice as far as VB goes, so I would really appreciate your help. I just wrote a series of small programs in VB, and I would like to put them on the Internet. They should be activated with a click on a link or a button within a web page, and they should run on the server and display results in another web page.

I read somewhere that VBScript is good for these sorts of things. In this case I had to rule out VBS since I use some stuff that VBS does not support.

Help me out here if you can.
Thanks in Advance,
Sam

Sastraxi
May 9th, 2001, 05:34 PM
Try converting them to ActiveX. Then you can view them in a webpage with (I think?) an EMBED or something else. Use:

<A HREF="pagethatholdsactivexobject.htm" TARGET="Frame_That_Does_Not_Exist">My Program</A>

sterko
May 9th, 2001, 06:05 PM
Sastraxi,
thanks for the suggestion. I don't understand what you mean exactly?

I have a program in visual basic. I thought about creating an executable out of it and storing it on the server. When a user visits the web page that lays on that server, he should be able to click on a link or a button and activate my executable. When the executable is activated it should do a bunch of tasks on the server and generate a dynamic web page and display it in the visitor's web browser.

Now, the program I already have does all the tasks and displays them in a browser, I just don't know how to activate this program from a link, make it run on the server, and display the results to the visitor. If ActiveX is the way to go, can you please elaborate a bit about how to convert them to ActiveX and about EMBED?

Sastraxi
May 9th, 2001, 06:26 PM
Actually I'm not sure meself...
But when you do you could also access them as:

Set MyObj = Server.CreateObject("MyLib.MyProg")

in an ASP page of course

Sastraxi
May 9th, 2001, 06:28 PM
Okay then all you need to do then is do <A HREF="myprog.exe>CLiCK mE</A>, this will d/l it to the user and then they can run it themselves

sterko
May 9th, 2001, 07:07 PM
Sastraxi,
But I don't want a visitor to have to download the executable and run it himself/herself :). The executable uses applications that a visitor probably doesn't have on his computer, so it must run on the server.

It is very important that the executable runs on the server. And it is triggered by a button or a link click in a web page. Any ideas?

kayoca
May 10th, 2001, 09:46 AM
The only way i know off is dont make an exe but create an ActiveX.
And use this in you asp page

Set MyObj = Server.CreateObject("MyLib.MyProg")

So when the user clicks on your link. Redirect him to your asp page.
And your AxtiveX can be activated. This is a way i know off how to run programs on your server.
But you have to register your ActiveX on your server.

monte96
May 10th, 2001, 10:51 AM
IIS does not have permissions to run a program outside of it's own address space. This means that only in-process dll programs can be executed on the server from IIS. No .exe's.

Cander
May 16th, 2001, 12:10 PM
on the server.

sterko
May 16th, 2001, 12:24 PM
Thanks Cander,
How do I register an Active X on a Server? Is there anything else I need to worry about; perhaps some sort of include statements in the .asp page?

sterko
May 17th, 2001, 02:02 AM
I just read somewhere that this Active X approach will only work with IE. Is that true?

JoshT
May 17th, 2001, 06:08 AM
Yes. ActiveX is a slightly older technology made by the iron fists of Microsoft to combat Java applets.

sterko
May 17th, 2001, 12:31 PM
Is there any way to do this in a Netscape compatible way?

JoshT
May 17th, 2001, 12:41 PM
Is there any way to do this in a Netscape compatible way?

Yeah, do it all on the server. Convert your VB programs into either
1. COM DLLs
2. ASP pages written in VBScript.

As long as you don't need to use client-side VBscript or client-side ActiveX Controls, you'll be fine.