Solved

Need to pass parameters to a ActiveX EXE from HTML/PHP

Posted on 2003-11-12
6
644 Views
Last Modified: 2010-05-01
I've created an ActiveX EXE application with a UserDocument (.VBD file) in Visual Basic 6. The whole system is accessed and viewed within Internet Explorer. I need to find a way to pass parameters to this application when it is launched.

Is it possible to add parameters to the URL, e.g. http://myurl.com/myvbd.vbd?arg1=val1&arg2=val2 ? if so, how do I access them from in the VB code?

Any way to get variables from the PHP system that is responsible for redirecting the user to the VBD document would sort this out! I dont really want to resort to writing the variables out to a web accessible file, and then fetching (and parsing) it within VB!
0
Comment
Question by:toasta
6 Comments
 
LVL 2

Accepted Solution

by:
MaxPol earned 450 total points
ID: 9730638
I don't have VB6 and don't know vdb extensions, but here some try.

Why not creating an OCX? It could be easily diplayed in the Web form and you could set (via vbscipt) any properties it expose.

If you can't, could you access session variables? (Session("VarA") = "something").
If yes, you could set this variables with a small VB script before the handling of your ActiveX.

Have you tried the Command$ variable? (just in case you didn't).

Could you interact with the Iexplorer application and retrieve the address bar (that containg the parameters) and parse them?

I just give you idea, don't know if they might be usefull to you as I cannot try them on my own.

When I did an OCX to be used on the Web, it was a normal OCX that exposed the paramters required. So I could easily managed them by vbscript.

Max

0
 

Author Comment

by:toasta
ID: 9730745
Max, thanks for your reply.

I did initially try using an OCX. Problem was that I need the application to run in a separate thread and to open a Modeless Form (which it turns out you cant do unless you are using a .exe).

I guess an alternative to what i'm doing at the moment (using a .VBD document) could be to have an ActiveX Control in the .exe. Trubble is I dont know how to subsequently embed that control into my webpage (or even if thats possible!). Once that is done I could pass parameters in using "<PARAM etc...>". If anyone knows how to solve that problem then the points are yours!

ben
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9730921
hearing...
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 26

Expert Comment

by:EDDYKT
ID: 9731234


I 've not create any UserDoc before but should you be about to use Request object
ie obj = Request.QueryString("arg2")
0
 
LVL 26

Assisted Solution

by:EDDYKT
EDDYKT earned 50 total points
ID: 9731265
ie

add ms active server pages object library references


Dim a As ASPTypeLibrary.Request

 obj = a.QueryString("arg2")
0
 

Author Comment

by:toasta
ID: 9731405
EDDYKT, I cant get that Request object idea to work. I dont think that it can be used for VBD files. Nice idea tho!

I'm going to give Max the points since he gave me the idea of using VBScript. I've somewhat re-engineered my project but its much nicer now :- )
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now