Alaska Software Inc. - Copy and Paste In XbpCrt window
Username: Password:
AuthorTopic: Copy and Paste In XbpCrt window
Pedro HernndezCopy and Paste In XbpCrt window
on Sun, 14 Aug 2005 07:27:31 -0400
In this Possible ?


Thanks
AUGE_OHRRe: Copy and Paste In XbpCrt window
on Sun, 14 Aug 2005 15:49:52 +0200
hi,

> In this Possible ?

Yes : SetMouse(.T.)

greetings by OHR
Jimmy
Jose ValleRe: Copy and Paste In XbpCrt window
on Mon, 15 Aug 2005 00:25:21 +0200
Hola Pedro:

Hace algunos mese publicaron aqui unas modificaciones en GETSYSX.PRG que 
usaban el objeto Clipboard para implementar copiar y pegar.


 Copy to Clipboard
CASE nEvent == xbeK_CTRL_C

    oClipBoard := XbpClipBoard():new():create()
    oClipBoard:open()

    cText := oGet:buffer
    oClipBoard:setBuffer(cText, XBPCLPBRD_TEXT)

    oClipBoard:close()
    oClipBoard:destroy()

    CLEAR TYPEAHEAD   Para que no haga avance de pgina en DET

    //MsgBox("Copiado a Portapapeles")


 Copy from Clipboard
CASE nEvent == xbeK_CTRL_V

     oClipBoard := XbpClipBoard():new():create()
     oClipBoard:open()
     aFormats := OClipBoard:queryFormats()

     IF AScan(aFormats, XBPCLPBRD_TEXT) > 0

       //cText := oClipBoard:getBuffer(XBPCLPBRD_TEXT)
       cText := Alltrim(oClipBoard:getBuffer(XBPCLPBRD_TEXT))

       n := len(cText)

       FOR i := 1 to n
         cChar := cText[i]

         /* Transfer character to edit buffer */
         IF Set(_SET_INSERT)
            oGet:insert( cChar )
         ELSE
            oGet:overstrike( cChar )
         ENDIF

         /* No room left to type to the right of the cursor */
         IF oGet:typeOut
            IF Set(_SET_BELL)
              QQOut( Chr(7) )
            ENDIF

            IF ! Set(_SET_CONFIRM)
              oGet:exitState := GE_ENTER
            ENDIF

            EXIT
            ****

         ENDIF
       NEXT i

       oClipBoard:close()
       oClipBoard:destroy()

    ENDIF



OTHERWISE



"Pedro Hernndez" <pedroah@gmail.com> escribi en el mensaje 
news:XU590MMoFHA.3104@S15147418...
> In this Possible ?
>
>
> Thanks
>
Pedro HernndezRe: Copy and Paste In XbpCrt window
on Thu, 18 Aug 2005 12:24:40 -0500
Funciona excelente ..

Me gustara saber si tienes algo para el Mouse, puesto que la instruccin 
SetMouse(.t.) no me funciona.





Muchas Gracias




"Jose Valle" <jm@ejido.net> wrote in message 
news:5EFdM8RoFHA.5608@S15147418...
> Hola Pedro:
>
> Hace algunos mese publicaron aqui unas modificaciones en GETSYSX.PRG que 
> usaban el objeto Clipboard para implementar copiar y pegar.
>
>
>  Copy to Clipboard
> CASE nEvent == xbeK_CTRL_C
>
>    oClipBoard := XbpClipBoard():new():create()
>    oClipBoard:open()
>
>    cText := oGet:buffer
>    oClipBoard:setBuffer(cText, XBPCLPBRD_TEXT)
>
>    oClipBoard:close()
>    oClipBoard:destroy()
>
>    CLEAR TYPEAHEAD   Para que no haga avance de pgina en DET
>
>    //MsgBox("Copiado a Portapapeles")
>
>
>  Copy from Clipboard
> CASE nEvent == xbeK_CTRL_V
>
>     oClipBoard := XbpClipBoard():new():create()
>     oClipBoard:open()
>     aFormats := OClipBoard:queryFormats()
>
>     IF AScan(aFormats, XBPCLPBRD_TEXT) > 0
>
>       //cText := oClipBoard:getBuffer(XBPCLPBRD_TEXT)
>       cText := Alltrim(oClipBoard:getBuffer(XBPCLPBRD_TEXT))
>
>       n := len(cText)
>
>       FOR i := 1 to n
>         cChar := cText[i]
>
>         /* Transfer character to edit buffer */
>         IF Set(_SET_INSERT)
>            oGet:insert( cChar )
>         ELSE
>            oGet:overstrike( cChar )
>         ENDIF
>
>         /* No room left to type to the right of the cursor */
>         IF oGet:typeOut
>            IF Set(_SET_BELL)
>              QQOut( Chr(7) )
>            ENDIF
>
>            IF ! Set(_SET_CONFIRM)
>              oGet:exitState := GE_ENTER
>            ENDIF
>
>            EXIT
>            ****
>
>         ENDIF
>       NEXT i
>
>       oClipBoard:close()
>       oClipBoard:destroy()
>
>    ENDIF
>
>
>
> OTHERWISE
>
>
>
> "Pedro Hernndez" <pedroah@gmail.com> escribi en el mensaje 
> news:XU590MMoFHA.3104@S15147418...
>> In this Possible ?
>>
>>
>> Thanks
>>
>
>
>