In doing some QA testing with one of my applications .. I am using SHELLEXECUTE to open a .PDF help file .. One person in my test group ( from the usual suspects ) did not have ANY .pdf reader so when you clicked on the Help line .. nothing happened.
Is there a way to capture whether there is a 'default' .Pdf reader installed on a computer ?
Thanks
Rick Lipkin
- Code: Select all Expand view
//-------------------------
Static Func _Webhelp( cOLDDEFA, dEXE )
LOCAL oDLG,oBRU, oSAY, oSAY1, Saying, oHand, x
DEFINE BRUSH oBru FILENAME ( cOLDDEFA+"\CCI.BMP" )
DEFINE CURSOR oHAND HAND
DEFINE DIALOG oDLG ;
TITLE "About this Program" ;
SIZE 555, 290 BRUSH oBRU TRANSPARENT
@ 7,10 SAY oSay PROMPT "Click here for the HELP Manual" ;
PIXEL of oDLG COLOR "N+/W"
oDlg:aControls[ 1 ]:lTransparent = .t.
@ 130,10 SAY oSay1 PROMPT "Revision Date "+dtoc( dEXE )+;
" "+FWVERSION+" "+VERSION() PIXEL of oDLG COLOR "N+/W"
oDlg:aControls[ 2 ]:lTransparent = .t.
If .not. File(cOldDefa+"\YachtCoveHelp.Pdf")
Saying := "The Help file "+cOldDefa+"\YachtCoveHelp.Pdf is not Available"
MsgInfo( Saying )
Else
oSay:lWantClick = .T.
oSay:bLClicked = { | | SHELLEXECUTE(nil,"open", cOldDefa+"\YachtCoveHelp.Pdf",0,0,1) }
oSay:oCursor = oHAND
Endif
ACTIVATE DIALOG oDLG CENTERED
oBru:End()
RETURN(NIL)