Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2003-11-12
6
647 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

856 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