Pretty similar with this one:
And I converted it to VB.net version since the question is tagged with it:
Public Class Form1
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Ansi)> _
Public Shared Function OpenClipboard(ByVal hWndNewOwner As IntPtr) As Boolean
End Function
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Ansi)> _
Public Shared Function CloseClipboard() As Boolean
End Function
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Ansi)> _
Public Shared Function SetClipboardData(ByVal uFormat As UIntPtr, ByVal data As IntPtr) As Boolean
End Function
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
OpenClipboard(IntPtr.Zero)
Dim yourString = "Hello World!"
Dim ptr As String = Marshal.StringToHGlobalUni(yourString)
SetClipboardData(13, ptr)
CloseClipboard()
Marshal.FreeHGlobal(ptr)
End Sub
End Class