|
-
Jun 14th, 2012, 09:43 AM
#1
Sticky Notes for XP
I use windows vista at home and I use those little sticky notes all the time! At work I have xp and the sticky notes didn't come with xp. So I decided to make them for Window's XP. This was developed in Visual Basic Express 2010 targeting the .net framework 4.0
Features:
-Add multiple notes
-Right Click Menu Includes:
A. Clear Text
B. Edit Text
C. Save Text
D. Pin to desktop
Drawbacks:
-The pin to desktop is a little funny. If you pin to desktop while it's ontop of another program then you have to minimize every program for the sticky to stay at the desktop.
-If you add multiple stickys at once, I can see where it would take up some memory.
Plans - As of right now, I don't have any plans to fix the pin to desktop. Simply because I wanted the program to be as basic as possible, without including any API's.
Notes - I wanted to point out that this isn't just for window's xp, it would work fine with vista and I'm sure 7, however the reason I developed this was because I wanted something for xp. Also, the borders in vista makes the note look a little wierd.
ScreenShot:
Sticky Notes.zip
Source:
Code:
Option Strict On
Option Explicit On
Public Class Form1
Private pt As New Point
Private saved As Boolean = False
#Region "Moves a bordless Form"
Private Sub Panel1_MouseMove(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseMove
If saved = False Then
Dim delta As New Size(e.X - pt.X, e.Y - pt.Y)
If (e.Button = MouseButtons.Left) Then
Me.Location += delta : pt = e.Location - delta
Else
pt = e.Location
End If
End If
End Sub
#End Region
#Region "Control Events"
Private Sub lblAdd_Click(sender As Object, e As System.EventArgs) Handles lblAdd.Click
'Adds a new sticky
Dim form As New Form1
.form.Show()
.form.Focus()
End Sub
Private Sub lblClose_Click(sender As System.Object, e As System.EventArgs) Handles lblClose.Click
'Closes the Form
.Me.Close()
End Sub
#End Region
#Region "Context Menustrip"
Private Sub ClearTextToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ClearTextToolStripMenuItem.Click
'Clears Text
.txtBox.Text = String.Empty
If txtBox.ReadOnly = True Then
.txtBox.ReadOnly = False
End If
End Sub
Private Sub SaveTextToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles SaveTextToolStripMenuItem.Click
'Makes the textbox readonly
.txtBox.ReadOnly = True : EditTextToolStripMenuItem.Enabled = True : SaveTextToolStripMenuItem.Enabled = False
End Sub
Private Sub EditTextToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles EditTextToolStripMenuItem.Click
'Makes the textbox editable
.txtBox.ReadOnly = False : EditTextToolStripMenuItem.Enabled = False : SaveTextToolStripMenuItem.Enabled = True
End Sub
Private Sub PinToDesktopToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles PinToDesktopToolStripMenuItem.Click
'Pins the program
If saved = False Then
.saved = True : PinToDesktopToolStripMenuItem.Checked = True : lblClose.Visible = False : Me.ShowInTaskbar = False
.SetParent(Me.Handle, FindWindow("ProgMan", Nothing))
.Me.SendToBack()
Else
.saved = False : PinToDesktopToolStripMenuItem.Checked = False : lblClose.Visible = True : Me.ShowInTaskbar = True
End If
End Sub
#End Region
End Class
Last edited by dday9; Feb 27th, 2013 at 12:03 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|