Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Call Visual Basic program from a Visual FoxPro program
Message
From
14/10/1998 16:31:50
 
 
To
14/10/1998 14:09:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00146763
Message ID:
00146865
Views:
46
>How do I call a Visual Basic program from a Visual Basic program with a sending value/parameter. Please help...

Lots of ways. Assuming that the VB program accepts a command line parameter, you can run in using the native RUN command in VFP, or use any of several API calls to fire it with an approrpiate command line (ShellExecute() and CreateProcess() work just fine; there's an example of using CreateProcess() in a recent FAQ entry I wrote on running an external program and waiting on it to complete.) And several automation objects provide mechanisms as well.

>
>Or if anyone know Visual FoxPro equivalent of command: printer.hDC (Visual Basic.) hDC returns a unique value (set by Windows) of the device context of an object (in this case it is the printer.) I was using a custom AcitveX control to interact with scanners in my VFP program. It works fine but I cannot print the scanned image stored in the ActiveX control. I know that I need to get the unique value defined in Windows for the printer (and in VB it is printer.hDC) There is no where in VFP could I find something similar to hDC in VB.

Take a look at messages posted in the last few days; there was a thread that discussed using a method of an RTF ActiveX control to retrieve the printer handle.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform