home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
- Object = "{BF681672-D0F5-11D2-A445-E69F105FEC22}#1.0#0"; "SYSTRAY.OCX"
- Begin VB.Form frmDemo
- Caption = "SysTrayIt demo"
- ClientHeight = 1935
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 4485
- Icon = "Demo.frx":0000
- LinkTopic = "Form1"
- ScaleHeight = 1935
- ScaleWidth = 4485
- ShowInTaskbar = 0 'False
- StartUpPosition = 3 'Windows Default
- Begin SysTray.SysTrayIt SysTrayIt
- Left = 1560
- Top = 840
- _ExtentX = 979
- _ExtentY = 979
- TipText = "Insert tip text here"
- Icon = "Demo.frx":0442
- End
- Begin MSComctlLib.ImageList ilstIcons
- Left = 840
- Top = 840
- _ExtentX = 1005
- _ExtentY = 1005
- BackColor = -2147483643
- ImageWidth = 16
- ImageHeight = 16
- MaskColor = 12632256
- _Version = 393216
- BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
- NumListImages = 8
- BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "Demo.frx":075C
- Key = ""
- EndProperty
- BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "Demo.frx":0BB0
- Key = ""
- EndProperty
- BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "Demo.frx":1004
- Key = ""
- EndProperty
- BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "Demo.frx":1458
- Key = ""
- EndProperty
- BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "Demo.frx":18AC
- Key = ""
- EndProperty
- BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "Demo.frx":1D00
- Key = ""
- EndProperty
- BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "Demo.frx":2154
- Key = ""
- EndProperty
- BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
- Picture = "Demo.frx":25A8
- Key = ""
- EndProperty
- EndProperty
- End
- Begin VB.Timer timTimer
- Enabled = 0 'False
- Interval = 500
- Left = 270
- Top = 900
- End
- Begin VB.CommandButton cmdStart
- Caption = "Start demo"
- Height = 555
- Left = 90
- TabIndex = 0
- Top = 120
- Width = 1455
- End
- Attribute VB_Name = "frmDemo"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub cmdStart_Click()
- SysTrayIt.Visible = Not SysTrayIt.Visible 'Shows/hides icon
- timTimer.Enabled = SysTrayIt.Visible 'Starts to circle through images
- cmdStart.Caption = IIf(SysTrayIt.Visible, "Stop demo", "Start demo")
- End Sub
- Private Sub Form_Load()
- SysTrayIt.TipText = "Double click to stop me!" 'Default tip text
- Set SysTrayIt.Icon = ilstIcons.ListImages(1).Picture 'Default picture (can be set at desing time too)
- End Sub
- Private Sub Form_Resize()
- If Me.WindowState = vbMinimized Then
- Set SysTrayIt.Icon = Me.Icon 'Sets icon to be shown
- SysTrayIt.TipText = "Click me to resize me!" 'Sets tip text too
- SysTrayIt.Visible = True 'Shows icon is systray
- End If
- End Sub
- Private Sub Form_Terminate()
- SysTrayIt.Visible = False 'Removes icon from systray
- End Sub
- Private Sub SysTrayIt_Click()
- If Me.WindowState = vbMinimized Then
- Me.WindowState = vbNormal
- SysTrayIt.Visible = False 'Removes icon from systray
- Me.SetFocus 'Sets focus to form
- End If
- End Sub
- Private Sub SysTrayIt_DblClick()
- Call cmdStart_Click
- End Sub
- Private Sub timtimer_Timer()
- 'Circles through moon pictures in ilstIcons
- Static Pic As Integer
- Pic = (Pic Mod 8) + 1
- Set SysTrayIt.Icon = ilstIcons.ListImages(Pic).Picture
- End Sub
-