.net 2.0


Beta 6.9 released – .NET 2.0 REQUIRED

Download it here

It’ll be at least a few more weeks before I get around to finishing the edit settings form, so here is everything I have so far:

Changes:
Ported code to .Net framework 2.0
Menu and toolbar changed to MenuStrip and multiple ToolStrips (all rearrangable)
Replaced native measure and draw text code with TextRenderer functions
Added “???? ” ansi ramp and valid characters – Select “Plain Text (Unicode)” as the type when saving the text
Changed “Close without saving the output?” to “Save the output before closing?”
Added menu icons
Replaced context menus with context menu strips


Update

The program has been converted to .net 2.0. The menus have all been replaced with draggable menustrips, and I’m using the Silk icons set for most of the items. The exe size has dropped by about 80k.

All but one of the native winapi functions have been replaced with .net functions (for the last I need to either find a way to check the text metrics in .net or an accurate method to detect if the font is fixed width).

About having accurate output for all the fonts, and this is a real kicker, they were always accurate. The richtextbox control doesn’t display them correctly. Even in the older version, if the text is all messed up and you save it as an image it will save correctly. Using ANSI characters, some of the fonts display the characters in the control as a square, but still save the output correctly. We will just have to live with it until I sort out a way to fix the output, or write my own text control.

I want to add one more thing before I release the new version (a form to edit the settings), so unless I get distracted by another project it’ll be out sometime this week.

Boring technical stuff that I couldn’t find the solution for online and had to workout for myself, part 1
You have a toolStripContainer with a MenuStrip and a set of ToolStrips. After spending a couple of minutes neatly lining them all up how you want, you save and compile and everything’s good. Except that every single time you reload the form, or just switch to the code then back to the designer, all the controls are rearranged to fit one per line. EVERY SINGLE TIME.

Here is how to set the control positions at runtime:

// First clear the container
toolStripContainer1.TopToolStripPanel.Controls.Clear();

// Then add the strips one by one in _reverse_ order using:
ToolStripContainer1.TopToolStripPanel.Join(ToolStripWhatever);

// Finally add the menustrip:
toolStripContainer1.TopToolStripPanel.Join(menuStrip1);


Update

It’s been a while. I haven’t stopped writing the program, it’s just that I keep starting new features but not finishing them.

Next Version
The next release will have the text brightness/contrast controls replaced with a levels adjustment control. It’s a bit of a big change, but it’s working in a test application and the output is really nice. I’m doing this because contrast was basically useless when the output was being stretched, and adjusting levels gives a much better control. I’ll cover how to use it in more detail when it’s done.

Currently, I’ve finished the code to apply the levels and I’m writing the control to do it in the program. I wanted to do it right, so I actually sat down and designed it and came up with a good internal class design (I’ll have to upload the UML class diagram somewhere or nobody will notice). Hopefully a working version will be in the cvs in a few days.

.Net Framework 2.0
I wasn’t going to move to .Net 2.0, but since Microsoft are giving away the basic program it seems silly not to upgrade. This means that you will have to install the .Net framework 2.0, either through Windows update, or here.

It won’t be the next version, but it will happen when I’ve properly converted and tested everything.

The main differences will be:
– Better programming environment. It’s so nice <3
– Dockable menu and toolbar, both with a WindowsXp style
– Faster execution (apparently)
– TextRenderer class should let me remove all the native pinvoked code