Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying hyperlinks
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00606266
Message ID:
00606555
Vues:
22
>In VS6 is there a way to display a hyperlink inside an Edit Box. For example if I have a memo field with its contents being displayed with an Edit Box and I want a hyperlink to be active within the content. Is there a way to do this. Or, is this something available in VFP 7?
>
>Thanks,
>Mike

Another way to have active hyperlink in editbox is to use the seltext property to detect if a valid url was selected and launch the browser on rightclick. The link was not underline but, at least, can be activated.

Its not really what you want, but...
**************************************************
*-- Class:        hlinktextbox 
*-- ParentClass:  editbox
*-- BaseClass:    editbox
*
DEFINE CLASS hlinktextbox AS editbox

   Height = 107
   Width = 266
   Name = "hlinktextbox"

   PROCEDURE RightClick
      if !empty(this.seltext) and (this.seltext="http://www" ;
          or this.seltext="www")

         if at(" ",this.seltext)>0
             chref=substr(this.seltext,1,at(" ",this.seltext))
          else
             chref=this.seltext
          endif

        DECLARE INTEGER ShellExecute ;
          IN SHELL32.DLL ;
          INTEGER nWinHandle, ;
          STRING cOperation, ;
          STRING cFileName, ;
          STRING cParameters, ;
          STRING cDirectory, ;
          INTEGER nShowWindow

       **vfp main windows handle
          DECLARE INTEGER FindWindow ;
            IN WIN32API ;
            STRING cNull, ;
            STRING cWinName

          cDir=sys(5)+sys(2003)+"\"
          z=ShellExecute(FindWindow( 0, _SCREEN.CAPTION), ;
             "Open", chref, "", cDir, 1)

      endif
   ENDPROC

ENDDEFINE
*
*-- EndDefine: hlinktextbox
**************************************************
HTH
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform