Workaround: Clipboard History icon in the Taskbar

Deleted
Not applicable

Spelunky_0-1614011147938.png

 

A video showing how the feature works can be seen here:

Download at Google Drive 

 

If you are interested in testing the software, I made it available for download on Google Drive:

Download the Software (Google Drive) 

 

This is the code:

 

 

using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;

namespace ClipboardHistory
{
    static class Program
    {
        [DllImport("user32.dll")]

        private static extern void keybd_event(byte virtualKey, byte bScan, int dwFlags, int dwExtraInfo);
        private const int KEYEVENTF_EXTENDEDKEY = 1;
        private const int KEYEVENTF_KEYUP = 2;
        public static void DoKeyDown(Keys virtualKey)
        {
            keybd_event((byte)virtualKey, 0, KEYEVENTF_EXTENDEDKEY, 0);
        }

        public static void DoKeyUp(Keys virtualKey)
        {
            keybd_event((byte)virtualKey, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
        }



        static void Main()
        {
            try
            {
                SendKeys.SendWait("%{Tab}");

                string[] args = Environment.GetCommandLineArgs();
                System.Threading.Thread.Sleep(Convert.ToInt32(args[1]));

                DoKeyDown(Keys.LWin);
                DoKeyDown(Keys.V);
                DoKeyUp(Keys.LWin);
                DoKeyUp(Keys.V);

                Application.Exit();
            }            
            catch
            {
                MessageBox.Show("An error occurred and was handled", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Application.Exit();
            }
        }    
    }
}

 

 

 

The zip has 3 files into a folder:

Spelunky_0-1614015963503.png

 

Unzip the folder anywhere in your computer.

Drag the shortcut to your taskbar. The shortcut already has an image, but if you don't like the one I chose, just download any other image in the ico format and change the shortcut image.

After the shortcut is on the taskbar, right click on it and choose Properties:

 

Spelunky_3-1614016879878.png

Then set a value in milliseconds at the end of the command line. For me, with my notebook settings, 15 milliseconds is enough, but depending on your computer’s settings (whether it’s less or more powerful) you may need to increase this value to 20, 50, 100 etc. (any value can be entered, remembering that 1000 milliseconds is equal to 1 second). This is necessary because Clipboard History is not beeing calling natively by Windows, so there is a certain delay that can cause Clipboard History to not be displayed correctly when it is run with a workaround like this.

0 Replies