Click here to Skip to main content
Click here to Skip to main content

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

, 11 Oct 2007
Rate this:
Please Sign up or sign in to vote.
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)

Share

About the Author

Abhijit Jana
Technical Lead
India India
.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
My Kinect Book : Kinect for Windows SDK Programming Guide
Follow on   Twitter

Comments and Discussions

 
GeneralSuggestion and Feedback PinmemberAbhijit@CodeProject11-Oct-07 5:48 
GeneralRe: Suggestion and Feedback Pinmemberf1mei011-Oct-07 7:43 
GeneralRe: Suggestion and Feedback PinmemberAbhijit Jana13-Oct-07 2:32 
GeneralRe: Suggestion and Feedback Pinmemberf1mei013-Oct-07 4:26 
GeneralRe: Suggestion and Feedback PinmemberBillWoodruff15-Oct-07 17:44 
GeneralRe: Suggestion and Feedback PinmemberAbhijit Jana15-Oct-07 18:25 
GeneralRe: Suggestion and Feedback PinmemberRavipabbathi15-Apr-08 20:15 
GeneralRe: Suggestion and Feedback Pinmembersamadhan_kshirsagar3-Sep-13 23:02 

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.

| Advertise | Privacy | Mobile
Web01 | 2.8.140827.1 | Last Updated 11 Oct 2007
Article Copyright 2007 by Abhijit Jana
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid