Monday 13 May 2019

ClearClipboard.exe clears any data on the Windows' clipboard

This uses the inbuilt compilers in Windows 10 - there are three VB.NET compilers and three C# compilers - just copy each text file into the same folder and double click the batch file to make the program.
REM ClearClipboard.bat
REM This file compiles ClearClipboard.vb to ClearClipboard.exe using the system VB.NET compiler
REM ClearClipboard clears any data on the Windows' clipboard
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\vbc.exe" /target:winexe /out:"%~dp0\ClearClipboard.exe" "%~dp0\ClearClipboard.vb" 
pause



'ClearClipboard.vb
Imports System
Imports System.Windows.Forms.Clipboard
Public Module MyApplication  


 Sub Main()
  System.Windows.Forms.Clipboard.Clear()
 End Sub
End Module

No comments:

Post a Comment