home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Sticky_Not3650111212001.psc / Form1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-11-21  |  7.7 KB  |  255 lines

  1. VERSION 5.00
  2. Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
  3. Begin VB.Form frmNote 
  4.    BackColor       =   &H00FFFFFF&
  5.    BorderStyle     =   4  'Fixed ToolWindow
  6.    Caption         =   "Note"
  7.    ClientHeight    =   3030
  8.    ClientLeft      =   150
  9.    ClientTop       =   675
  10.    ClientWidth     =   4140
  11.    Icon            =   "Form1.frx":0000
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    Picture         =   "Form1.frx":000C
  16.    ScaleHeight     =   202
  17.    ScaleMode       =   3  'Pixel
  18.    ScaleWidth      =   276
  19.    StartUpPosition =   3  'Windows Default
  20.    Begin VB.Timer tmrEvent 
  21.       Interval        =   1000
  22.       Left            =   0
  23.       Top             =   2640
  24.    End
  25.    Begin MSComCtl2.DTPicker myTime 
  26.       Height          =   255
  27.       Left            =   2160
  28.       TabIndex        =   3
  29.       TabStop         =   0   'False
  30.       Top             =   2520
  31.       Visible         =   0   'False
  32.       Width           =   1215
  33.       _ExtentX        =   2143
  34.       _ExtentY        =   450
  35.       _Version        =   393216
  36.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  37.          Name            =   "MS Serif"
  38.          Size            =   6
  39.          Charset         =   0
  40.          Weight          =   700
  41.          Underline       =   0   'False
  42.          Italic          =   0   'False
  43.          Strikethrough   =   0   'False
  44.       EndProperty
  45.       CalendarBackColor=   65535
  46.       CalendarForeColor=   255
  47.       CalendarTitleBackColor=   65535
  48.       CalendarTitleForeColor=   255
  49.       CalendarTrailingForeColor=   65535
  50.       Format          =   22806530
  51.       CurrentDate     =   37216
  52.    End
  53.    Begin MSComCtl2.DTPicker myDate 
  54.       Height          =   255
  55.       Left            =   840
  56.       TabIndex        =   4
  57.       TabStop         =   0   'False
  58.       Top             =   2520
  59.       Visible         =   0   'False
  60.       Width           =   1215
  61.       _ExtentX        =   2143
  62.       _ExtentY        =   450
  63.       _Version        =   393216
  64.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  65.          Name            =   "MS Serif"
  66.          Size            =   6
  67.          Charset         =   0
  68.          Weight          =   700
  69.          Underline       =   0   'False
  70.          Italic          =   0   'False
  71.          Strikethrough   =   0   'False
  72.       EndProperty
  73.       CalendarBackColor=   65535
  74.       CalendarForeColor=   0
  75.       CalendarTitleBackColor=   65535
  76.       CalendarTitleForeColor=   0
  77.       CalendarTrailingForeColor=   65535
  78.       Format          =   22806529
  79.       CurrentDate     =   37216
  80.    End
  81.    Begin VB.TextBox txtNote 
  82.       BackColor       =   &H0000FFFF&
  83.       BorderStyle     =   0  'None
  84.       BeginProperty Font 
  85.          Name            =   "MS Sans Serif"
  86.          Size            =   8.25
  87.          Charset         =   0
  88.          Weight          =   700
  89.          Underline       =   0   'False
  90.          Italic          =   0   'False
  91.          Strikethrough   =   0   'False
  92.       EndProperty
  93.       Height          =   1935
  94.       Left            =   480
  95.       MultiLine       =   -1  'True
  96.       TabIndex        =   0
  97.       Top             =   840
  98.       Width           =   2895
  99.    End
  100.    Begin VB.Label Label1 
  101.       BackColor       =   &H0000FFFF&
  102.       BackStyle       =   0  'Transparent
  103.       Caption         =   "Menu"
  104.       BeginProperty Font 
  105.          Name            =   "MS Sans Serif"
  106.          Size            =   8.25
  107.          Charset         =   0
  108.          Weight          =   700
  109.          Underline       =   0   'False
  110.          Italic          =   0   'False
  111.          Strikethrough   =   0   'False
  112.       EndProperty
  113.       Height          =   255
  114.       Left            =   240
  115.       TabIndex        =   5
  116.       Top             =   240
  117.       Width           =   495
  118.    End
  119.    Begin VB.Label lblMinimise 
  120.       BackStyle       =   0  'Transparent
  121.       Height          =   135
  122.       Left            =   3000
  123.       TabIndex        =   2
  124.       Top             =   240
  125.       Width           =   135
  126.    End
  127.    Begin VB.Line Line3 
  128.       BorderWidth     =   2
  129.       X1              =   200
  130.       X2              =   208
  131.       Y1              =   24
  132.       Y2              =   24
  133.    End
  134.    Begin VB.Label lblClose 
  135.       BackStyle       =   0  'Transparent
  136.       Height          =   135
  137.       Left            =   3240
  138.       TabIndex        =   1
  139.       Top             =   240
  140.       Width           =   135
  141.    End
  142.    Begin VB.Line Line2 
  143.       BorderWidth     =   2
  144.       X1              =   216
  145.       X2              =   224
  146.       Y1              =   24
  147.       Y2              =   16
  148.    End
  149.    Begin VB.Line Line1 
  150.       BorderWidth     =   2
  151.       X1              =   216
  152.       X2              =   224
  153.       Y1              =   16
  154.       Y2              =   24
  155.    End
  156.    Begin VB.Menu mnopt 
  157.       Caption         =   "options"
  158.       Begin VB.Menu mnuSetDateTime 
  159.          Caption         =   "Set Date/Time To Show Note"
  160.       End
  161.       Begin VB.Menu mnubar1 
  162.          Caption         =   "-"
  163.       End
  164.       Begin VB.Menu mnuStayOnTop 
  165.          Caption         =   "Stay On Top"
  166.       End
  167.       Begin VB.Menu mnuHideMin 
  168.          Caption         =   "Hide Note When Minimised"
  169.          Checked         =   -1  'True
  170.       End
  171.    End
  172. Attribute VB_Name = "frmNote"
  173. Attribute VB_GlobalNameSpace = False
  174. Attribute VB_Creatable = False
  175. Attribute VB_PredeclaredId = True
  176. Attribute VB_Exposed = False
  177. Dim TimeChanged As Boolean
  178. Private Sub mnuHideMin_Click()
  179.     If mnuHideMin.Checked = False Then
  180.         mnuHideMin.Checked = True
  181.     Else
  182.         mnuHideMin.Checked = False
  183.     End If
  184. End Sub
  185. Private Sub mnuSetDateTime_Click()
  186.     If mnuSetDateTime.Checked = False Then
  187.         'make date time setters visible
  188.         myTime.Visible = True
  189.         myDate.Visible = True
  190.         mnuSetDateTime.Checked = True
  191.         'set textbox height
  192.         txtNote.Height = 105
  193.     Else
  194.         myTime.Visible = False
  195.         myDate.Visible = False
  196.         mnuSetDateTime.Checked = False
  197.         'turn off timer if it's on
  198.         tmrEvent.Enabled = False
  199.         'set textbox height
  200.         txtNote.Height = 129
  201.     End If
  202. End Sub
  203. Private Sub mnuStayOnTop_Click()
  204.     If mnuStayOnTop.Checked = False Then
  205.         rtn = SetWindowPos(Me.hWnd, -1, 0, 0, 0, 0, 3)
  206.         mnuStayOnTop.Checked = True
  207.     Else
  208.         rtn = SetWindowPos(Me.hWnd, -2, 0, 0, 0, 0, 3)
  209.         mnuStayOnTop.Checked = False
  210.     End If
  211.     txtNote.SetFocus
  212. End Sub
  213. Private Sub Form_Load()
  214. myDate.Value = Date
  215. tmrEvent.Enabled = False
  216. If Me.Picture <> 0 Then
  217.   Call SetAutoRgn(Me)
  218. End If
  219. End Sub
  220. Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  221. If Button = vbLeftButton Then
  222.   ReleaseCapture
  223.   SendMessage Me.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&
  224. End If
  225. End Sub
  226. Private Sub Label1_Click()
  227.     Me.PopupMenu Me.mnopt
  228. End Sub
  229. Private Sub lblClose_Click()
  230.     Unload Me
  231. End Sub
  232. Private Sub lblMinimise_Click()
  233.     If TimeChanged = True Then
  234.         TimeChanged = False
  235.         tmrEvent.Enabled = True
  236.     End If
  237.     If mnuHideMin.Checked = False Then
  238.         Me.WindowState = vbMinimized
  239.     Else
  240.         tmrEvent.Enabled = True
  241.         Me.Visible = False
  242.     End If
  243. End Sub
  244. Private Sub myTime_Change()
  245.     TimeChanged = True
  246. End Sub
  247. Private Sub tmrEvent_Timer()
  248.     'MsgBox Format(myTime, "hh:mm:ss")
  249.     If myDate = Date And Format(myTime, "hh:mm") = Format(Time, "hh:mm") Then
  250.         Me.Show
  251.         rtn = SetWindowPos(Me.hWnd, -1, 0, 0, 0, 0, 3)
  252.         tmrEvent.Enabled = False
  253.     End If
  254. End Sub
  255.