#Include ONCE "../Inc/Translate.bi"

Function ClassTranslate.SetClipBoardText(ByVal Text As String) As Integer
	
  Var Clip = GlobalAlloc(GMEM_MOVEABLE Or GMEM_SHARE, Len(Text)+1)
  
  OpenClipboard(0)
  
  EmptyClipboard()
  
  Var Mem = GlobalLock(Clip)
  
  CopyMemory(Mem, Strptr(Text), Len(Text))
  
  GlobalUnlock(Mem)
  
  Function=cast(integer,SetClipboardData(CF_TEXT,Clip))
  
  CloseClipboard()
  
End Function