>How do I call a Visual Basic program from a Visual Basic program with a sending value/parameter. Please help...
>
>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.
>
>Thank you very much for your help.
Hi Monique,
You'd have to call the Windows API to get a device context. Here's the code:
DECLARE INTEGER CreateDC IN Win32API;
STRING @lpszDriver, STRING @lpszDevice,;
STRING @lpszOutput, STRING @lpInitData
nhDC = CreateDC('WINSPOOL', lcPrinter, 0, 0)
hth,
George
Ubi caritas et amor, deus ibi est