Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Open any document
Message
De
22/06/2001 23:00:00
 
 
À
22/06/2001 10:57:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00522489
Message ID:
00522714
Vues:
10
>FAQ #7656 (June 22, 1997, by Gérald Santerre) explains how to open the default browser from VFP.
>
>This is a big understatement: actually, the same procedure can be used to open any document with the program registered in Windows to open that extension. (RUN can only open executables.)



Yup, ShellExecute API can do any document as the ext is registered in Windows.
Besides, you can allow to pass parameters to the Exe files to additional feature.

For me, sometime need to do extra special function.
Such as copy the new-add customer record to ALL other sister company.
Of cos, all the database Name are same and I prevent wrong behaviour.

I make a single exe file to do it.

CopyCust.exe [F:\CompanyA] [CUST_NO]

It will duplicate the record to all other network directory on that unique cust_no information.
After copy, that copycust exe will be gone.

Back to that API call, if you learn 2 more API:

keybd_event, mouse_event

You can wait for some time and direct handle other application as if you sit in front of PC to do.
For Example, you opent UT webpage and move the mouse pointer to login textbox, then key-in:

username [tab] password [tab][tab][space]

2nd tab to skip recover last login, space to click sumbit button.

You will automatic login UT.

For more API function reference, I suggest to visit http://www.vbapi.com/
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform