My Notes (a small application between notepad and OneNote)

I have been using Windows 7 and  Windows Server 2008 R2 since the first beta. And I mean on my “production” laptops. And I have to say that I haven’t had any major issues with them. In fact I’ve used to them so much that I don’t want to use older versions anymore :-) And there are few improvements in them that I specially enjoy. Of course the biggest one is the new taskbar... But surprisingly I have also found new application that I have “always needed”: Sticky Notes!

Sticky Notes is small application where you can write small notes to yourself. I call it “something between notepad and OneNote”. Reason for that is the fact that notepad is lightweight but it doesn’t contain any features. OneNote is full-blown application with tons of features. Sticky Notes lives between those too... It contains just enough features that make it useful and it also looks nice! The only issue I’m having with the Sticky Notes is the fact that it comes with Windows 7 only :-( So in my main “production” laptop (which is R2) I don’t have sticky notes.

For me it was a bit disappointing but I still understood the logic for that. Of course Sticky Notes isn’t “something that you would expect on the server” but since I really need this kind of application... I was forced to create one :-)

Normally when I create application I’ll just create new .NET project and start writing the application. But now I don’t want to suffer this penalty (screenshot taken from “File –> New Project: Windows Forms Application –> Run”):

.NET Windows Forms application 
Downside of .NET applications is the memory usage. Normally I don’t care about it but since now I’m going to create application that will be “always on” I just have to care about it. I don’t want to waste too much memory (I only have 8 GB of it :-). Therefore I decided to go with the native way (Win32, C/C++ or whatever you like to call it). It gives me possibility to be in control of all the used resources.

And here is the result “My Notes” application:

My Notes - Example

I’ve hidden the menus and tried to make the borders as small as possible. I don’t want to waste space as much the normal Windows application does:
Standard windows application 
“Standard” windows application doesn’t look that good either. So therefore I wanted to give it a bit more “fresh and appealing looks”. I used GDI+ and LinearGradientBrush to make it fancier. In case your wondering how to add GDI+ to your native application then it’s just this simple:

 GdiplusStartupInput gdiplusStartupInput;ULONG_PTR gdiplusToken;GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);// ...GdiplusShutdown(gdiplusToken);

See more about GDI+ on MSDN if your interested.

Even if I wanted the application to small borders I didn’t want to completely remove the menus. I used same thing as in IE for example... pressing Alt brings in the menu:

My Notes - Menu visible

I also wanted to give myself possibility to extend the application little bit more and I also added context menu to the edit surface. I don’t know yet what to put there but it’s nice to have if I need it someday :-)

My Notes - Content menu

I had to add “graphical menu” for basic operations like New and Close (just for fun):

My Notes - Graphical menu

Graphical menu is only visible if mouse is on top of the so called caption bar (as in screenshot).

And of course this should be in x64 since I’m running my R2 on x64:

VS Configuration Manager dialog

If your wondering why you don’t have the option to use x64 then you haven’t most likely checked the option in the Visual Studio setup. Just go to Control Panel and locate VS and select option to change the setup:

Control panel - Visual Studio 
Then just check the x64 if that’s what you want:

VS setup 

And last but not least... I’ve put my My Notes to the Live Mesh folder and synchronized my content to other devices. It’s simple and since I’m saving my note content to Rich Text Format (RTF) I can open up my notes even in my Windows Mobile. So now I have pretty good solution for my notes.

Anyways... Happy hacking!