Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to launch site?
Message
 
 
À
30/01/2023 11:01:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01686010
Message ID:
01686011
Vues:
58
>Hello all,
>
>I will have a button on form. When the user clicks that button I want to launch where the user can make it's payment.
>
>My app is on WIndows Server 2016.
>
>So far someone gave me this code
>
>
>lParameters tcURL, tcAction
>tcUrl = IIF(type("tcUrl")="C",tcUrl,"https://square.link/u/HereCodeForThePersonWhowillBePaid")
>tcAction = IIF(type("tcAction")="C",tcAction,"Open")
>IF type("Application.StartMode") = "N" AND !inlist(Application.StartMode,2,3,5)
>  *  UI only when not being called from a COM server
>  WAIT WINDOW "Loading " + tcURL + " ..." NOWAIT
>ENDIF
>DECLARE INTEGER ShellExecute IN SHELL32.dll ;
>     INTEGER nWinHandle, ;
>     STRING cOperation, ;
>     STRING cFileName, ;
>     STRING cParameters, ;
>     STRING cDirectory, ;
>     INTEGER nShowWindow
>DECLARE INTEGER FindWindow IN WIN32API ;
>     STRING cNull, ;
>     STRING cWinName
>RETURN ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcUrl,"",SYS(2023),1)
>
>
>First time I executed that code I received this : Declare DLL caused an exception
>Second time I executed my VFP session froze.
>
>Suggestion?
>
>Regards

Hi Denis,

I have this code and it works:
DECLARE INTEGER ShellExecute IN shell32.dll ; 
  INTEGER hndWin, ; 
  STRING cAction, ; 
  STRING cFileName, ; 
  STRING cParams, ;  
  STRING cDir, ; 
  INTEGER nShowWin

cURL = ALLTRIM(TableName.WEB_URL)
cAction = "open"
ShellExecute(0,cAction,cURL,"","",1)
HTH
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform