Code Samples, Tips, Tricks and
other Neat Stuff for the VB developer

All Content Copyright © 2000
New Vision Software
All rights reserved

VB Petition

Many of you may not be aware that Microsoft's mainstream support for VB6 officially ended on March 31st, 2005.  Now that this has occurred, it becomes increasingly more likely that future updates to Windows may break existing VB code.  If you are concerned about this and/or are concerned about migration issues associated with bringing existing VB code to the .NET platform, please take a moment to read and sign the petition asking Microsoft to extend there COM based VB product line.  The impetus behind the petition is the desire to give companies and individuals with substantial investments in existing VB code a path forward to the latest development platform without the current requirement for wholesale rewrites of existing code.  Thanks for your support!

Bryan

   

Home

All Sample Projects

Grouped Samples

Common Dialogs

Control Stuff

Date & Timezone

Drawing

Graphics

Text

File Routines

Form Modifications

Icon Routines

Listbox & ComboBox

Menus

Mouse

Subclassing

Text Parsing Routines

UserControl Demos

Specific Samples

Activate Previous

Instance

API & OLE DragDrop

Environment Variables

GUID - UUID

ListView

Message Box

Collections

Thunking

File Split Utility

Save Clipboard Utility

Visual Basic Tips!


 

 Save Clipboard Utility

Tired of having VB clear your clipboard whenever you start it with certain addins loaded?  This little utility stub can end your frustration!  The stub takes the place of your VB.exe file and internally stores any text that you had previously saved to the clipboard.  It then launches VB passing along any command line parameters.  Once VB has fully loaded, the stub restores the clipboard before exiting.

This is something the addins should already be doing but I guess their authors couldn't be bothered with doing things "correctly".  Shame on them!  It is important to note that not all addin authors are clueless about this issue.  Many are conscientious and restore the clipboard after they paste their toolbar button images in the VB IDE.  It seems that the main culprits are the MS addins like the resource editor and others.

 

The directions for implementing this stub are simple.

  1. Download the Save_Clipboard.zip (17KB) file and unzip it to a folder on your hard drive.

  2. Back up your VB exicutable (Vb5.exe or Vb6.exe).

  3. Rename your VB EXE file to have an "a" after the version number.  If you are using VB5 this will change Vb5.exe to Vb5a.exe.  If you are using VB6 this will change Vb6.exe to Vb6a.exe.

  4. Rename the SaveClipboard.exe file to the original VB file name (Vb5.exe or Vb6.exe) and place it in the same folder as the VB exicutable.

That's all there is to it!

A couple of important notes:

  1. If you ever need to install a service patch on your copy of VB, you will want to rename the exe to the original name until after the install is complete.

  2. This is totally unsupported so, you are on your own if you choose to install the stub (it works well although it may not work with all add-ins available for use in the VB IDE).