Using CodeLab to Build a DLL
Make DLL files to share your effects with friends!
Before making a DLL file, you must save your source code. Select the File > Save menu item or press Ctrl-S to save your work. Select a file name and press the Save button.
Once your source code is saved and you are happy with your effect you are ready to make a perminant copy to share with your friends. Select the File > Save as DLL menu item or press Ctrl-B. You should see the following screen:
When building a DLL file, you need to specify the menu settings and the support information. Menu settings are used by Paint.NET to determine where to add your plugin into Paint.NET and how it should be shown in the Paint.NET menu. Support information is displayed to the user if your plugin ever crashes. That information can be useful to you later when trying to debug issues.
Your first decision is wether to put your effect into Paint.NET's Adjustments menu or the Effects menu. Adjustments are effects that work on single pixels alone. Effects are plugins that work with multiple pixels at a time, distort the user's picture, or completely ignore the user's picture to render something completely different. Most effects go into the Effects menu.
Next, choose a submenu for your effect. The drop-down list box contains several standard choices for you. If you do not find one that satisfies you, simply type your own. If you use one of the standard menus from Paint.NET (Artistic, Blurs, Distort, Noise, Photo, Render, or Stylize) your effect will show up in the proper Localized menu when Paint.NET is running in a language other than English. If you wish your effect to show up in the main menu (not a submenu) just leave this blank.
Then, enter the text your effect should show in Paint.NET's menu. You must enter some text here.
If you would like to attach an icon to your effect's menu, click the "Select Icon" link. From the open dialog box, select a 16x16 pixel PNG image for use as the icon. Your PNG file may contain transparent areas. Please note, this will only work if the PNG file is exactly 16 pixels wide by 16 pixels tall. An icon is not required.
Enter your name in the Author's Name box. After all, you are the author of this new effect!
Choose a version number for your effect. You can click the up or down buttons to easily select numbers. Usually the first version of an effect is 1.0 and minor updates increment the second number (1.1, 1.2, etc.) and major updates increment the first number (1.0, 2.0, etc.). The decision is completely up to you.
Finally, enter a URL where people can find out more information about your effect. The default URL in CodeLab is http://www.getpaint.net/redirect/plugins.html which is the address of the Paint.NET plugin forum.
When you are happy with all of the information entered, press the Build button. This will create your DLL file and put it into your C:\Program Files\Paint.NET\Effects folder. When you restart Paint.NET you should see your new effect in the specified menu!
If you can't find it, check Paint.NET's File > Load Errors menu for details on what went wrong.
In your script, you can specify defaults to the following screen fields:
The default submenu can be placed in your script by using the following:
// Submenu: Artistic
Of course, replace "Artistic" with your desired submenu name.
The effect's menu name can be placed in your script by using the following:
// Name: Ink Sketch
The effect's title bar text can be placed in your script by using the following:
// Title: BoltBait's Ink Sketch - v1.0
The author's name can be placed in your script by using the following:
// Author: BoltBait
The support URL can be placed in your script by using the following:
// URL: http://boltbait.com/pdn
You need to place each of these alone on a line within your script for CodeLab to find them and use them.
Sharing your DLL
Once you are happy with your DLL file, you can share it with your friends. One good place to share Paint.NET Effect DLL files is at the Paint.NET effects discussion board. That is a great place to learn how to write plugins, share your discoveries, and show off your work!
You can share both your Script file and your DLL file. Just remember when posting script files on the message board to use [code] and [/code] tags around your script. Also, you must zip your DLL file before uploading it to the Paint.NET message board server.
Advanced C# Coders
Remember before that I said that you only need to write the Render loop and that CodeLab would write the rest of the code for you? Well, if you are curious what that code looks like, check the "View source" box before pressing the Build button. If you do that, CodeLab will show you all of the code that it wrote along with all of your code. You can copy-and-paste that code into a Visual Studio project for further study and tweeks.
Here is some more information that you may find useful:
CodeLab Effects Design Overview
Designing a User Interface for Your Effect
Sample Code for User Interface Elements
Using the Code Editor
CodeLab Help File
Check for CodeLab Updates
CodeLab 4.2 Released
(March 18, 2019)
This latest release of CodeLab for Paint.NET includes the
Notepad++ editor and a full WYSIWYG help editor.
HTML Editor 1.5 Released
(March 31, 2016)
This latest release is a complete rewrite adding a wysiwyg editor mode and a much improved UI.
Double-Six Dominoes 3.0
(September 25, 2015)
This long-awaited refresh of the most popular dominoes game
on Download.com is now available!