I have used some clipboard functions from the code archive, but they create a MAV on exiting. Now this works in Blitz Plus, and there appears to be nothing wrong with the process at all. I'm stumped and now think its a B3d issue.
;**** These added to DECLS ****
;OpenClipboard%(hwnd%):"OpenClipboard"
;CloseClipboard%():"CloseClipboard"
;ExamineClipboard%(format%):"IsClipboardFormatAvailable"
;EmptyClipboard%():"EmptyClipboard"
;GetClipboardData$(format%):"GetClipboardData"
;SetClipboardData%(format%,txt$):"SetClipboardData"
;******************************
Pa$="Test Line Test Line"+Chr$(13)+Chr$(10)
For f=1 To 200
Pa1$=Pa1$+Pa$
Next
WriteClipboardText(Pa1$)
Pa$=ReadClipboardText$()
WaitKey
Function WriteClipboardText(txt$)
Local cb_TEXT=1
If txt$="" Then Return
If OpenClipboard(0)
EmptyClipboard
SetClipboardData cb_TEXT,txt$
CloseClipboard
EndIf
End Function
;-----------------------------------
Function ReadClipboardText$()
Local cb_TEXT=1
Local txt$=""
If OpenClipboard(0)
If ExamineClipboard(cb_TEXT)
txt$=GetClipboardData$(cb_TEXT)
EndIf
CloseClipboard
EndIf
Return txt$
End Function
;**** These added to DECLS ****
;OpenClipboard%(hwnd%):"OpenClipboard"
;CloseClipboard%():"CloseClipboard"
;ExamineClipboard%(format%):"IsClipboardFormatAvailable"
;EmptyClipboard%():"EmptyClipboard"
;GetClipboardData$(format%):"GetClipboardData"
;SetClipboardData%(format%,txt$):"SetClipboardData"
;******************************
Pa$="Test Line Test Line"+Chr$(13)+Chr$(10)
For f=1 To 200
Pa1$=Pa1$+Pa$
Next
WriteClipboardText(Pa1$)
Pa$=ReadClipboardText$()
WaitKey
Function WriteClipboardText(txt$)
Local cb_TEXT=1
If txt$="" Then Return
If OpenClipboard(0)
EmptyClipboard
SetClipboardData cb_TEXT,txt$
CloseClipboard
EndIf
End Function
;-----------------------------------
Function ReadClipboardText$()
Local cb_TEXT=1
Local txt$=""
If OpenClipboard(0)
If ExamineClipboard(cb_TEXT)
txt$=GetClipboardData$(cb_TEXT)
EndIf
CloseClipboard
EndIf
Return txt$
End Function