Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to launch site?
Message
From
30/01/2023 15:42:01
 
 
To
30/01/2023 15:06:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01686010
Message ID:
01686025
Views:
48
I should've try this before but I thought the problem was with the code.

The code is allright. The problem is my computer. Looks like I'll have to reinstall or fix windows 11.

I'm saying that because I tried that code on my windows server 2016 and I've been able to launch the page.

I have another problem though. I'll start a new thread about this one.

Thanks for your help.


>Restart your computer or reinstall Windows.
>
>>Still,
>>
>>Declare DLL caused an exception
>>
>>:-(
>>
>>>I don't understand why you need the FindWindow call. Try this simplified version. It works fine on my machine.
>>>If it works, you need to change the hardcoded URL.
>>>
>>>
>>>tcUrl = IIF(type("tcUrl")="C",tcUrl,"https://www.vfphelp.com/vfp9/index.htm")
>>>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
>>>RETURN ShellExecute(0,tcAction,tcUrl,"",'',1)
>>>
>>>>Hi Tore
>>>>
>>>>this line
>>>>
>>>>RETURN ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcUrl,"",SYS(2023),1)
>>>>
>>>>>>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
>>>>>
>>>>>Which line gave the error?
*******************************************************
Save a tree, eat a beaver.
Denis Chassé
Previous
Reply
Map
View

Click here to load this message in the networking platform