Code: Select all
cText := Get_Report_As_Text()
oClipBoard := XbpClipboard():new():create()
oClipBoard:open()
oClipBoard:setBuffer(cText,XBPCLPBRD_TEXT)
if oClipBoard:getBuffer(XBPCLPBRD_TEXT) == cText
lOk:=.t.
endif
oClipBoard:close()
oClipBoard:destroy()
my_alert("Text "+iif(lOk,"","cannot be ")+"copied to clipboard"+iif(lOk," Ok",""))
But when I run it and after the alert appears I go to my Notepad window and paste and instead of the text I was expecting I get some bit of code I copied earlier in the day.
Can anyone see anything wrong? Or am I wrong in assuming that the Xbase++ clipboard can be used by other Windows programs?