Hi Al
Why can you use shellexecute?
All you would have to do is validate your users entries,and if they are ok then shellexecute your exe, else set focus back to the fields onyour login form.
I have included an example of what I mean
IF THISFORM.validateinfo()
lnValue=ShellExecute(0, "open",THISFORM.lcFileToRun,THISFORM.lcParamsToPass ,THISFORM.lcPathOfFile, 1)
IF lnValue <32
DO CASE
CASE lnValue= 0
lcMessage="System was out of memory, executable file was corrupt, or relocations were invalid."
CASE lnValue= 2
lcMessage="File was not found."
CASE lnValue= 3
lcMessage="Path was not found."
CASE lnValue= 5
lcMessage="Attempt was made to dynamically link to a task, or there was a sharing or network-protection error."
CASE lnValue= 6
lcMessage="Library required separate data segments for each task."
CASE lnValue= 8
lcMessage="There was insufficient memory to start the application."
CASE lnValue=10
lcMessage="Windows version was incorrect."
CASE lnValue= 11
lcMessage=" Executable file was invalid. Either it was not a Windows application, or there was an error in the .exe image."
CASE lnValue= 12
lcMessage="Application was designed for a different operating system."
CASE lnValue= 13
lcMessage="Application was designed for MS-DOS 4.0."
CASE lnValue= 14
lcMessage="Type of executable file was unknown."
CASE lnValue= 15
lcMessage="Attempt was made to load a real-mode application (developed for an earlier version of Windows)."
CASE lnValue= 16
lcMessage="Attempt was made to load a second instance of an executable file containing multiple data segments that were not marked read-only."
CASE lnValue= 19
lcMessage="Attempt was made to load a compressed executable file. The File must be decompressed before it can be loaded."
CASE lnValue= 20
lcMessage="Dynamic-link library (DLL) file was invalid. One of the DLLs required to run this application was corrupt."
CASE lnValue=21
lcMessage="Application requires Microsoft Windows 32-bit extensions. "
ENDCASE
MESSAGEBOX("Sorry could not open file, reason :"+lcMessage,48,"Could not open site")
THISFORM.txtPassword.SETFOCUS()
RETURN .F.
ELSE
QUIT
ENDIF
ELSE
THISFORM.txtPassword.SETFOCUS()
ENDIF
Hope this is what you are looking for
Regards
Steven Bowskill
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement