home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / DNote2057553312007.psc / DNote / forms / frmMain.frm < prev    next >
Text File  |  2007-04-01  |  8KB  |  225 lines

  1. VERSION 5.00
  2. Begin VB.Form frmMain 
  3.    BackColor       =   &H80000009&
  4.    BorderStyle     =   0  'None
  5.    Caption         =   "Form1"
  6.    ClientHeight    =   7230
  7.    ClientLeft      =   3945
  8.    ClientTop       =   1560
  9.    ClientWidth     =   7740
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    Picture         =   "frmMain.frx":0000
  14.    ScaleHeight     =   7230
  15.    ScaleWidth      =   7740
  16.    ShowInTaskbar   =   0   'False
  17.    Begin VB.TextBox txtNote 
  18.       BackColor       =   &H00E0E0E0&
  19.       Height          =   5655
  20.       Left            =   120
  21.       MultiLine       =   -1  'True
  22.       ScrollBars      =   2  'Vertical
  23.       TabIndex        =   0
  24.       Top             =   840
  25.       Width           =   4215
  26.    End
  27.    Begin VB.Image imgPaste_down 
  28.       Height          =   300
  29.       Left            =   6000
  30.       Picture         =   "frmMain.frx":62E4C
  31.       Top             =   1485
  32.       Visible         =   0   'False
  33.       Width           =   1200
  34.    End
  35.    Begin VB.Image imgPaste_up 
  36.       Height          =   300
  37.       Left            =   4740
  38.       Picture         =   "frmMain.frx":64150
  39.       Top             =   1485
  40.       Visible         =   0   'False
  41.       Width           =   1200
  42.    End
  43.    Begin VB.Image imgCopy_down 
  44.       Appearance      =   0  'Flat
  45.       Height          =   300
  46.       Left            =   5970
  47.       Picture         =   "frmMain.frx":65454
  48.       Top             =   1050
  49.       Visible         =   0   'False
  50.       Width           =   1200
  51.    End
  52.    Begin VB.Image imgCopy_up 
  53.       Appearance      =   0  'Flat
  54.       Height          =   300
  55.       Left            =   4695
  56.       Picture         =   "frmMain.frx":66758
  57.       Top             =   1020
  58.       Visible         =   0   'False
  59.       Width           =   1200
  60.    End
  61.    Begin VB.Image imgClear_down 
  62.       Appearance      =   0  'Flat
  63.       Height          =   300
  64.       Left            =   5985
  65.       Picture         =   "frmMain.frx":67A5C
  66.       Top             =   660
  67.       Visible         =   0   'False
  68.       Width           =   1200
  69.    End
  70.    Begin VB.Image imgClear_up 
  71.       Appearance      =   0  'Flat
  72.       Height          =   300
  73.       Left            =   4665
  74.       Picture         =   "frmMain.frx":68D60
  75.       Top             =   645
  76.       Visible         =   0   'False
  77.       Width           =   1200
  78.    End
  79.    Begin VB.Image imgClose 
  80.       Height          =   165
  81.       Left            =   4260
  82.       Picture         =   "frmMain.frx":6A064
  83.       ToolTipText     =   "Hide Dnote"
  84.       Top             =   90
  85.       Width           =   135
  86.    End
  87.    Begin VB.Image imgClose_down 
  88.       Height          =   165
  89.       Left            =   6060
  90.       Picture         =   "frmMain.frx":6A1DC
  91.       Top             =   375
  92.       Visible         =   0   'False
  93.       Width           =   135
  94.    End
  95.    Begin VB.Image imgClear 
  96.       Appearance      =   0  'Flat
  97.       Height          =   300
  98.       Left            =   345
  99.       Picture         =   "frmMain.frx":6A354
  100.       Top             =   465
  101.       Width           =   1200
  102.    End
  103.    Begin VB.Image imgCopy 
  104.       Appearance      =   0  'Flat
  105.       Height          =   300
  106.       Left            =   1650
  107.       Picture         =   "frmMain.frx":6B658
  108.       Top             =   465
  109.       Width           =   1200
  110.    End
  111.    Begin VB.Image imgPaste 
  112.       Height          =   300
  113.       Left            =   2955
  114.       Picture         =   "frmMain.frx":6C95C
  115.       Top             =   465
  116.       Width           =   1200
  117.    End
  118.    Begin VB.Image imgClose_up 
  119.       Appearance      =   0  'Flat
  120.       Height          =   165
  121.       Left            =   5715
  122.       Picture         =   "frmMain.frx":6DC60
  123.       Top             =   360
  124.       Visible         =   0   'False
  125.       Width           =   135
  126.    End
  127. End
  128. Attribute VB_Name = "frmMain"
  129. Attribute VB_GlobalNameSpace = False
  130. Attribute VB_Creatable = False
  131. Attribute VB_PredeclaredId = True
  132. Attribute VB_Exposed = False
  133. Option Explicit
  134.  
  135. Private Sub Form_Load()
  136.     Me.BackColor = RGB(0, 0, 255)   ':: set the background color of the form
  137.                                     ':: this color will be rendered transparent
  138.     ':: set the form transaparent
  139.     If setWindowTransparent(Me.hWnd, RGB(0, 0, 255)) = False Then ':: if unsuccesfull
  140.         MsgBox TransparentWindow.TRANSWIN_ERROR ':: display the error message
  141.     End If
  142.     ':: set the window as the topmost window
  143.     Call SetWindowPos(Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE Or SWP_NOMOVE)
  144. End Sub
  145.  
  146. Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  147. On Error Resume Next
  148. ':: this procedure will  make the form dragable. Just click on the form surface
  149. ':: and drag to any position in the screen
  150.     If Button = vbLeftButton Then
  151.         Call ReleaseCapture
  152.         Call SendMessage(Me.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0)
  153.     End If
  154.  
  155. End Sub
  156.  
  157. Private Sub imgClear_Click()
  158.     ':: clear/empty text box
  159.     txtNote.Text = ""
  160. End Sub
  161.  
  162. Private Sub imgClear_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  163.     imgClear.Picture = imgClear_down.Picture
  164. End Sub
  165.  
  166. Private Sub imgClear_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  167.     imgClear.Picture = imgClear_up.Picture
  168. End Sub
  169.  
  170. Private Sub imgClose_Click()
  171.     Call showNote
  172. End Sub
  173.  
  174. Private Sub imgClose_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  175.     imgClose.Picture = imgClose_down.Picture
  176. End Sub
  177.  
  178. Private Sub imgClose_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  179.     imgClose.Picture = imgClose_up.Picture
  180. End Sub
  181.  
  182. Private Sub imgCopy_Click()
  183.     ':: copy text in the textbox to the clipboard
  184.     Call Clipboard.Clear ':: empty clipboard first before copying any data into it
  185.     Call Clipboard.SetText(txtNote.SelText) ':: copy selected text in textbox to clipboard
  186. End Sub
  187.  
  188. Private Sub imgCopy_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  189.     imgCopy.Picture = imgCopy_down.Picture
  190. End Sub
  191.  
  192. Private Sub imgCopy_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  193.     imgCopy.Picture = imgCopy_up.Picture
  194. End Sub
  195.  
  196. Private Sub imgPaste_Click()
  197.     ':: paste text from the clipboard to the location of the cursor in the textbox
  198.     If Clipboard.GetFormat(CF_TEXT) Then ':: check first if format is text data
  199.         txtNote.SelText = Clipboard.GetText
  200.     End If
  201. End Sub
  202.  
  203. Private Sub imgPaste_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  204.     imgPaste.Picture = imgPaste_down.Picture
  205. End Sub
  206.  
  207. Private Sub imgPaste_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  208.     imgPaste.Picture = imgPaste_up.Picture
  209. End Sub
  210.  
  211. ':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  212. '::                         CUSTOM PROCEDURES (SUB AND FUNCTION)
  213. ':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  214. ':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  215. ':: NAME        :
  216. ':: TYPE        :
  217. ':: SCOPE       :
  218. ':: PARAMETERS  :
  219. ':: RETURN      :
  220. ':: DESCRIPTION :
  221. '::...................................................................................
  222. ':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  223.  
  224.  
  225.