Download source files - 4 Kb
Introduction
Visual Studio allows us to perform common,repetitive tasks through macros. You, as a developer, will often find the need to insert copyright notices to your source code.This is a simple macro that does just that at the click of a button. Make your code safe from copyright infringements and look professional, in seconds.
Welcome to the wonderful world of macros to beginners. If you are already comfortable with macros, skip to the relevant parts.
Copyright notices
What are Copyright notices? Copyright notices are comments that are added to source code by the author, before public distribution of that source. These are typically present at the top of the source files. These comments make users of those source files aware about the copyright issues involved. Additionally you can insert any information that you find relevant.
This, for example, is a copyright notice that I often use.
You will need to customise this notice to suit your needs.
How to install and use.
This macro is also distributed as a devstudio macro file (.dsm) and is customizable and easy to use. To install the macro follow these simple steps
- Download the attached .dsm file and copy it to your Devstudio Macros directory. (For me, this is located under MSDev98 directory)
- Open MSDEV and goto Tools->Customize and click on AddIns and Macro files Tab.
- Enable the Copyright macro by enabling the checkbox next to it.
- Click on the Commands tab and select Macros from the Category list box.
- Drag-n-drop Copyright macro to the Devstudio toolbar.
- Select appropriate text/image(or both) from the Button Appearence dialog box and click on Close
Now you have the macro ready for use.
To insert your own copyright notices,(as you have guessed) you'd need to modify few parts of the macro file.
To do this, go to Tools->Macro and click on Copyright macro and hit Edit.
Edit the macro file to alter the Copyright notices to suit your need. Save the file.
That's it. (Phew!)
To use the macro simply place the cursor in a file where you would like to insert the copyright notice and click on the copyright macro button and say Presto!