home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD988.psc / Form1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-09-25  |  5.5 KB  |  193 lines

  1. VERSION 5.00
  2. Begin VB.Form frmMain 
  3.    BackColor       =   &H00000000&
  4.    BorderStyle     =   4  'Fixed ToolWindow
  5.    Caption         =   "Hacker`s Office 2000"
  6.    ClientHeight    =   720
  7.    ClientLeft      =   3225
  8.    ClientTop       =   480
  9.    ClientWidth     =   6360
  10.    Icon            =   "Form1.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   720
  15.    ScaleWidth      =   6360
  16.    ShowInTaskbar   =   0   'False
  17.    StartUpPosition =   2  'CenterScreen
  18.    Begin VB.Image Image10 
  19.       Height          =   480
  20.       Left            =   5760
  21.       Picture         =   "Form1.frx":08CA
  22.       Top             =   120
  23.       Width           =   480
  24.    End
  25.    Begin VB.Image Image9 
  26.       Height          =   480
  27.       Left            =   5040
  28.       Picture         =   "Form1.frx":1194
  29.       Top             =   120
  30.       Width           =   480
  31.    End
  32.    Begin VB.Image Image8 
  33.       Height          =   480
  34.       Left            =   4440
  35.       Picture         =   "Form1.frx":1A5E
  36.       Top             =   120
  37.       Width           =   480
  38.    End
  39.    Begin VB.Image Image7 
  40.       Height          =   480
  41.       Left            =   3720
  42.       Picture         =   "Form1.frx":2328
  43.       Top             =   120
  44.       Width           =   480
  45.    End
  46.    Begin VB.Image Image6 
  47.       Height          =   480
  48.       Left            =   3000
  49.       Picture         =   "Form1.frx":2BF2
  50.       Top             =   120
  51.       Width           =   480
  52.    End
  53.    Begin VB.Image Image5 
  54.       Height          =   480
  55.       Left            =   2280
  56.       Picture         =   "Form1.frx":34BC
  57.       Top             =   120
  58.       Width           =   480
  59.    End
  60.    Begin VB.Image Image4 
  61.       Height          =   480
  62.       Left            =   1560
  63.       Picture         =   "Form1.frx":3D86
  64.       Top             =   120
  65.       Width           =   480
  66.    End
  67.    Begin VB.Image Image3 
  68.       Height          =   480
  69.       Left            =   840
  70.       Picture         =   "Form1.frx":4650
  71.       Top             =   120
  72.       Width           =   480
  73.    End
  74.    Begin VB.Image Image1 
  75.       Height          =   480
  76.       Left            =   120
  77.       Picture         =   "Form1.frx":4F1A
  78.       Top             =   120
  79.       Width           =   480
  80.    End
  81.    Begin VB.Menu mnuTray 
  82.       Caption         =   "Popup"
  83.       Visible         =   0   'False
  84.       Begin VB.Menu mnuTrayRestore 
  85.          Caption         =   "&Restore"
  86.       End
  87.       Begin VB.Menu mnuTrayMove 
  88.          Caption         =   "&Move"
  89.       End
  90.       Begin VB.Menu mnuTraySize 
  91.          Caption         =   "&Size"
  92.       End
  93.       Begin VB.Menu mnuTrayMinimize 
  94.          Caption         =   "Mi&nimize"
  95.       End
  96.       Begin VB.Menu mnuTraySep 
  97.          Caption         =   "-"
  98.       End
  99.       Begin VB.Menu mnuTrayClose 
  100.          Caption         =   "&Close"
  101.       End
  102.    End
  103. Attribute VB_Name = "frmMain"
  104. Attribute VB_GlobalNameSpace = False
  105. Attribute VB_Creatable = False
  106. Attribute VB_PredeclaredId = True
  107. Attribute VB_Exposed = False
  108. Option Explicit
  109. Public LastState As Integer
  110. Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
  111. Private Const WM_SYSCOMMAND = &H112
  112. Private Const SC_MOVE = &HF010&
  113. Private Const SC_RESTORE = &HF120&
  114. Private Const SC_SIZE = &HF000&
  115. Public Sub SetTrayMenuItems(window_state As Integer)
  116.     Select Case window_state
  117.         Case vbMinimized
  118.             mnuTrayMinimize.Enabled = False
  119.             mnuTrayMove.Enabled = False
  120.             mnuTrayRestore.Enabled = True
  121.             mnuTraySize.Enabled = False
  122.         Case vbNormal
  123.             mnuTrayMinimize.Enabled = True
  124.             mnuTrayMove.Enabled = True
  125.             mnuTrayRestore.Enabled = False
  126.             mnuTraySize.Enabled = True
  127.     End Select
  128. End Sub
  129. Private Sub Form_Load()
  130.     If WindowState = vbMinimized Then
  131.         LastState = vbNormal
  132.     Else
  133.         LastState = WindowState
  134.     End If
  135.     AddToTray Me, mnuTray
  136.     SetTrayTip "VB Helper tray icon program"
  137. End Sub
  138. ' Enable the correct tray menu items.
  139. Private Sub Form_Resize()
  140.     SetTrayMenuItems WindowState
  141.     If WindowState <> vbMinimized Then _
  142.         LastState = WindowState
  143. End Sub
  144. ' Important! Remove the tray icon.
  145. Private Sub Form_Unload(Cancel As Integer)
  146.     RemoveFromTray
  147. End Sub
  148. Private Sub Image1_Click()
  149. frmMail.Show
  150. End Sub
  151. Private Sub Image10_Click()
  152. frmProgramCloser.Show
  153. End Sub
  154. Private Sub Image2_Click()
  155. frmArchiv.Show
  156. End Sub
  157. Private Sub Image3_Click()
  158. frmPortScanner.Show
  159. End Sub
  160. Private Sub Image4_Click()
  161. frmCDplayer.Show
  162. End Sub
  163. Private Sub Image5_Click()
  164. frmWeb.Show
  165. End Sub
  166. Private Sub Image6_Click()
  167. frmViewer.Show
  168. End Sub
  169. Private Sub Image7_Click()
  170. frmSpeed.Show
  171. End Sub
  172. Private Sub Image8_Click()
  173. frmHtml.Show
  174. End Sub
  175. Private Sub mnuTrayClose_Click()
  176.     Unload Me
  177. End Sub
  178. Private Sub mnuTrayMinimize_Click()
  179.     WindowState = vbMinimized
  180. End Sub
  181. Private Sub mnuTrayMove_Click()
  182.     SendMessage hwnd, WM_SYSCOMMAND, _
  183.         SC_MOVE, 0&
  184. End Sub
  185. Private Sub mnuTrayRestore_Click()
  186.     SendMessage hwnd, WM_SYSCOMMAND, _
  187.         SC_RESTORE, 0&
  188. End Sub
  189. Private Sub mnuTraySize_Click()
  190.     SendMessage hwnd, WM_SYSCOMMAND, _
  191.         SC_SIZE, 0&
  192. End Sub
  193.