blClicked on a say object

blClicked on a say object

Postby Rick Lipkin » Tue Oct 07, 2008 8:32 pm

To All

COnsider the following code .. I have two prompts ( say ) on a dialog and I am using those as markers to click on to open an intranet link. For some reason The oSay1 object is not being evaluated .. bLclicked is always returning the oSay object .. the cManual link line is not being run .. however if I rem out the oSay:bLclicked line .. the second shellexecute containing cManual fires and works fine.

Rick Lipkin



here is the code
Code: Select all  Expand view
//-------------------------
Static Func _Webhelp( cOLDDEFA, dEXE )

LOCAL oDLG, cSQL, oERR, oRsUser, cLINK, cMANUAL
LOCAL oBRU, oSAY,oSAY1,oSAY2

cLINK   := "  "
cMANUAL := "  "

oRsOwn := TOleAuto():New( "ADODB.Recordset" )
oRsOwn:CursorType     := 1        // opendkeyset
oRsOwn:CursorLocation := 3        // local cache
oRsOwn:LockType       := 3        // lockoportunistic

cSQL := "SELECT HELP_URL, MANUAL_URL FROM OWNER"

TRY
   oRSOwn:Open( cSQL,'Provider='+xPROVIDER+';Data Source='+xSOURCE+';Initial Catalog='+xCATALOG+';User Id='+xUSERID+';Password='+xPASSWORD )
CATCH oErr
   MsgInfo( "ERROR Opening Table OWNER" )
END TRY

IF oRsOwn:eof
ELSE
   cLINK   := oRsOwn:Fields("help_url"):Value
   cMANUAL := oRsOwn:Fields("manual_url"):Value
   IF EMPTY( cLINK )
      cLINK := "  "
   ELSE
      cLINK := ALLTRIM( cLINK )
   ENDIF
   IF EMPTY( cMANUAL )
      cMANUAL := "  "
   ELSE
      cMANUAL := ALLTRIM( cMANUAL )
   ENDIF

ENDIF

oRsOwn:Close()

DEFINE BRUSH oBru FILENAME ( cOLDDEFA+"\SPLASH.BMP" )

DEFINE DIALOG oDLG ;
     TITLE "About" ;
     SIZE 500, 320 BRUSH oBRU TRANSPARENT

@ 3,2 SAY oSay PROMPT "Click here for PMO Help on the Intranet" ;
        PIXEL of oDLG  COLOR "W+/W"
oDlg:aControls[ 1 ]:lTransparent = .t.

@ 3,165 SAY oSay1 PROMPT "Click here for On-Line User Manual" ;
        PIXEL of oDLG  COLOR "W+/W"
oDlg:aControls[ 2 ]:lTransparent = .t.

@ 150,2 SAY oSay2 PROMPT "Revision Date "+dtoc( dEXE )+;
        "    "+FWVERSION+"  "+VERSION() PIXEL of oDLG  COLOR "W+/W"
oDlg:aControls[ 3 ]:lTransparent = .t.


oSay1:lWantClick = .T.
oSay1:bLClicked = { || SHELLEXECUTE(nil,"open", cMANUAL,0,0,1) }

oSay:lWantClick = .T.
oSay:bLClicked = { || SHELLEXECUTE(nil,"open", cLINK,0,0,1) }


ACTIVATE DIALOG oDLG CENTERED

RETURN(NIL)
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Postby ShumingWang » Wed Oct 08, 2008 8:11 am

Urllink class might for you .

include" rullink.ch"
REDEFINE urllink ourl1;
ID 108 ;
URL "manual.htm" ;
OF odlg ;
TOOLTIP trans2("说明书")

ourl1:ccaption:="操作使用说明"

urllink control in rc/dll control as say control.

Shuming Wang
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Postby Antonio Linares » Wed Oct 08, 2008 8:15 am

Rick,

Today (since yesterday) I am out of the office on a FiveWin seminar.

Tomorrow I will be back at the office and we will review it, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 61 guests