Click here to Skip to main content
Licence CPOL
First Posted 11 Oct 2007
Views 29,599
Downloads 461
Bookmarked 41 times

Sticky Pad : A Microsoft-Outlook Style Notepad using C#

By | 11 Oct 2007 | Article
This is a small Notepad application of Microsoft-Outlook using C#
Screenshot - stm.jpg

Introduction

This is a different kind of Notepad in Microsoft-Outlook Style. You can access this from anywhere. Using this, you can always make your important notes in front of you.

Screenshot - StickyPad2.jpg

Use of Stick Pad is very simple. Just open the application, and write anything you want!!!

How To Use?

Just open one stick pad, you can write your notes, create any number of notes using it:

Screenshot - StickyPad1.jpg

Menus: Just right click on the icon. The following menu should come up:

  • New: It should create a new Sticky Pad [You can create a new sticky pad by Double clicking on the icon too.]
  • Always on Top: If it is checked, then your Sticky Pad should be on top of any application.
  • Minimize: If you want to minimize, then just click on it.
  • Color: You can select 4 different types of Sticky Pad colors.
  • Close: It should close your sticky pad.

You will be able to move your pad - just drag the title bar. You can close it using click on the close icon.

Screenshot - StickyPad3.jpg

Using the Code

The code for Stick pad is very simple:

//
// Sticky Pad V 1.0
// Author : Abhijit Jana
// Language : C#
// Code From Move the Form by dragging the label
public const int WM_NCLBUTTONDOWN = 0xA1;
public const int HT_CAPTION = 0x2;
[DllImportAttribute("user32.dll")]
public static extern int SendMessage(IntPtr hWnd,
int Msg, int wParam, int lParam);
[DllImportAttribute("user32.dll")]
public static extern bool ReleaseCapture();

// This will Move the form 
private void label1_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
ReleaseCapture();
SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
}
}

// Will create a new form on double click 
private void pictureBox2_MouseDoubleClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
string _FilePath = Application.ExecutablePath.ToString();
System.Diagnostics.Process.Start(_FilePath); ;
}
}

//
// Color Settings
//
#region ColorSettings 
private void redToolStripMenuItem_Click(object sender, EventArgs e)
{
this.textBox1.BackColor = System.Drawing.Color.FromArgb
	(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.BackColor = System.Drawing.Color.FromArgb
	(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
}
private void yellowToolStripMenuItem_Click(object sender, EventArgs e)
{
this.textBox1.BackColor=System.Drawing.Color.FromArgb
	(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.BackColor = System.Drawing.Color.FromArgb
	(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
}

private void greenToolStripMenuItem_Click(object sender, EventArgs e)
{
this.textBox1.BackColor = System.Drawing.Color.FromArgb
	(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.BackColor = System.Drawing.Color.FromArgb
	(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
}

private void blueToolStripMenuItem_Click(object sender, EventArgs e)
{
this.textBox1.BackColor = System.Drawing.Color.FromArgb
	(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.BackColor = System.Drawing.Color.FromArgb
	(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
}
#endregion

//This will place your Pad on Top
private void alwaysOnTopToolStripMenuItem_Click(object sender, EventArgs e)
{
if (this.alwaysOnTopToolStripMenuItem.Checked == true)
{
this.TopMost = false ;
this.alwaysOnTopToolStripMenuItem.Checked = false;
}
else
{
this.TopMost = true;
this.alwaysOnTopToolStripMenuItem.Checked = true;
}
}

Future Implementation

Sticky pad will be available with a New section of Right Click menu [as given in the figure]. Whenever we click on it, a new pad will open for us. We can save it, or during closing if the content is not null, it will automatically save with a special icon. We can open the same notes only with the Stick pad.

It will look like this and should be in next version of Sticky Pad:

Screenshot - StickyPadF1.jpg

History

  • 11th October, 2007: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Abhijit Jana

Software Developer (Senior)

India India

Member

Follow on Twitter Follow on Twitter
.NET Consultant | Former Microsoft MVP - ASP.NET | CodeProject MVP, Mentor, Insiders| Technology Evangelist | Author | Speaker | Geek | Blogger | Husband
 
Blog : http://abhijitjana.net
Web Site : http://dailydotnettips.com
Twitter@AbhijitJana

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralSuggestion and Feedback PinmemberAbhijit@CodeProject5:48 11 Oct '07  
GeneralRe: Suggestion and Feedback Pinmemberf1mei07:43 11 Oct '07  
GeneralRe: Suggestion and Feedback PinmemberAbhijit Jana2:32 13 Oct '07  
GeneralRe: Suggestion and Feedback Pinmemberf1mei04:26 13 Oct '07  
GeneralRe: Suggestion and Feedback PinmemberBillWoodruff17:44 15 Oct '07  
Please include source code with the code you can download directly from CodeProject for your project, that's an important part of the concept of CodeProject articles.
 
When you have implemented a Save feature, and the application will automatically open the last saved bunch of "stickies," then this may be useful.
 
best, Bill Woodruff
 
"The greater the social and cultural distances between people, the more magical the light that can spring from their contact." Milan Kundera in Testaments Trahis

GeneralRe: Suggestion and Feedback PinmemberAbhijit Jana18:25 15 Oct '07  
GeneralRe: Suggestion and Feedback PinmemberRavipabbathi20:15 15 Apr '08  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web03 | 2.5.120529.1 | Last Updated 11 Oct 2007
Article Copyright 2007 by Abhijit Jana
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid