Link to home
Start Free TrialLog in
Avatar of soft4u
soft4u

asked on

Passing variables to another WIN program

I would like to pass a variable to a windows program from my VB application. I am loading a Formflow form from my VB app. and in Formflow I shall search in the database for the variable I sent from VB. Anyone?
Avatar of Sendoh
Sendoh
Flag of New Zealand image

Hi !
I'm not sure why you need this but you can implement it in a easier way by stored the value in variable to a text file in HD and let the winapp access it.

Hope it'll help you.
Avatar of soft4u
soft4u

ASKER

You see I have a checklist in my VB interface. For each article number in the checklist there are forms to fill in or to just look at in Formflow. If an article no. in my checklist have certain form filled in in Formflow I would like to reach this by clicking a command button in VB and get right in to that form. Once that form is loaded it just has to find the record for my special article no. Hope you understand me, kind of hard to explain in a simple way.
Anyways, I don't like the idea of passing variables through a text file, there must be another way of passing variables.


I'm not familiar with Formflow.  Is this an off-the-shelf application, or one you wrote?  Either way, if it supports DDE or OLE then you can pass variables back and forth.  Any idea if Formflow supports any of these?

MD
Avatar of soft4u

ASKER

Yes it supports DDE and OLE. Formflow is the world leader in form management. It used to be owned by Delrina but it's now sold to Canadian company Jetform.

Hope you can help me
Well, if it supports either one, then you're in luck... of the two, your best bet is probably OLE.  To understand how to use OLE with Formflow, you probably need some documentation from Formflow about what objects and methods they "expose" for you to work with in your VB program.  Try contacting Jetform to see if they have any sample VB code, as I'm sure this is a fairly common request for them.

If you'd like to have a go at it yourself, then I suggest that you look at the VB sample in

VB\samples\PGuide\GeoFacts

This sample uses Ole Automation to open up Excel, load a spreadsheet and read data from it.  The major difference is that this sample is not making Excel visible, and you'd probably want to make Formflow visible (you can do that too if you want).  But, this sample will get you started.

You may be able to see some of the objects and methods that Formflow "exposes" by going to your Project|References screen and seeing if you see a checkbox for Formflow object library (if so, check it).  Then, go to View|Object Browser.  Select the Formflow library in the dropdown listbox.  Any items you see are objects you could work with in your program.

Good Luck.

MD
You can also use SendKeys to "drive" a program from VB. I use this technique for automatic document retreival. I have a database with file/page references and I have my VB app open Adobe Reader and tell it which file to access and what page to display when the operator clicks on the item in a listbox. Works well.

M

ASKER CERTIFIED SOLUTION
Avatar of jeffcameron
jeffcameron

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial