ClipboardGetText – Retrieving the text in the clipboard
‘ Get the text in the clipboardFunction ClipboardGetText() As String Return CStr(Clipboard.GetDataObject().GetData(DataFormats.Text))End Function
‘ Get the text in the clipboardFunction ClipboardGetText() As String Return CStr(Clipboard.GetDataObject().GetData(DataFormats.Text))End Function
‘ If the first argument is Nothing or a null string return the 2nd argumentFunction IfNull(ByVal value As String, ByVal defaultValue As Object) As String If Not value Is Nothing
Shared Function _ LoadLibrary(ByVal path As String) As IntegerEnd Function Shared Function _ GetProcAddress(ByVal hModule As Integer, ByVal procName As String) As _ IntegerEnd Function Shared Sub FreeLibrary _ (ByVal
‘ Check whether a specified file is a .NET assemblyFunction IsAssembly(ByVal filename As String) As Boolean Try Dim asm As [Assembly] = [Assembly].LoadFrom(filename) ‘ if no exception is thrown, this
‘ copy or append text to the clipboardSub ClipboardSetText(ByVal text As String) ClipboardSetText(text, False)End SubSub ClipboardSetText(ByVal text As String, ByVal append As Boolean) If append Then text = ClipboardGetText() &
‘ A reusable routine that displays error information’ Note: requires Imports System.ReflectionSub DisplayExceptionInfo(ByVal e As Exception) ‘ Display the error message. Console.WriteLine(e.Message) Dim st As New StackTrace(e, True) Dim i