home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Press 1998 September
/
Sezamfile98_2.iso
/
VBasic
/
ZTRAY10.ZIP
/
Form1.frm
next >
Wrap
Text File
|
1997-08-04
|
6KB
|
223 lines
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "comctl32.ocx"
Object = "{CBB104A8-0C3C-11D1-BC39-004095912184}#2.0#0"; "ZTray.ocx"
Object = "{FE0065C0-1B7B-11CF-9D53-00AA003C9CB6}#1.0#0"; "COMCT232.OCX"
Begin VB.Form Form1
Caption = "Sample"
ClientHeight = 3150
ClientLeft = 60
ClientTop = 390
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3150
ScaleWidth = 4680
StartUpPosition = 3 'Windows Default
Begin VB.TextBox txtStatus
Height = 2295
Left = 1920
MultiLine = -1 'True
TabIndex = 6
Top = 720
Width = 2655
End
Begin VB.CheckBox chkShow
Caption = "Show Tray Icon"
Height = 375
Left = 120
TabIndex = 5
Top = 1560
Value = 1 'Checked
Width = 1455
End
Begin ComCtl2.UpDown UpDown1
Height = 285
Left = 496
TabIndex = 4
Top = 1080
Width = 240
_ExtentX = 423
_ExtentY = 503
_Version = 327680
Value = 1
BuddyControl = "txtINum"
BuddyDispid = 196612
OrigLeft = 2280
OrigTop = 1200
OrigRight = 2520
OrigBottom = 1935
Max = 5
Min = 1
SyncBuddy = -1 'True
Wrap = -1 'True
BuddyProperty = 65547
Enabled = -1 'True
End
Begin VB.TextBox txtINum
Height = 285
Left = 120
Locked = -1 'True
TabIndex = 3
Text = "1"
Top = 1080
Width = 375
End
Begin VB.TextBox txtTip
Height = 285
Left = 120
TabIndex = 0
Text = "Text1"
Top = 360
Width = 4455
End
Begin myZTray.ZTray ZTray1
Left = 960
Top = 2280
_ExtentX = 953
_ExtentY = 953
ImageList = "ImageList1"
TipText = "Testing the ZTray control!"
ImageNumber = 1
End
Begin VB.Label Label2
Caption = "ImageNumber:"
Height = 255
Left = 120
TabIndex = 2
Top = 840
Width = 1215
End
Begin VB.Label Label1
Caption = "TipText:"
Height = 255
Left = 120
TabIndex = 1
Top = 120
Width = 1335
End
Begin ComctlLib.ImageList ImageList1
Left = 120
Top = 2280
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 48
ImageHeight = 48
MaskColor = 12632256
_Version = 327680
BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
NumListImages = 5
BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":0000
Key = ""
EndProperty
BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":031A
Key = ""
EndProperty
BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":0634
Key = ""
EndProperty
BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":094E
Key = ""
EndProperty
BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":0C68
Key = ""
EndProperty
EndProperty
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Check1_Click()
End Sub
Private Sub chkShow_Click()
'All it takes to turn on/off the icon is to set
' Ztray.showintray to true/false.
If chkShow.Value = 1 Then
ZTray1.ShowInTray = True
Else
ZTray1.ShowInTray = False
End If
End Sub
Private Sub Form_Load()
' Turn the icon on (show it in the tray).
ZTray1.ShowInTray = True
' Here I am setting the tip text box to the default
' text on the ZTray control.
txtTip.Text = ZTray1.TipText
End Sub
Private Sub txtINum_Change()
' This sets the ZTray ImageNumber to the next
' number in the list. So you can see how easy
' it is to change the icon on the tray.
ZTray1.ImageNumber = Val(txtINum)
End Sub
Private Sub txtTip_Change()
' This changes the TipText for the ZTray.
' This is the tip that appears when the
' mouse moves over the icon on the tray.
ZTray1.TipText = txtTip.Text
End Sub
Private Sub ZTray1_Click(button As Integer)
' This prints the text of which button was clicked
' to give an example of how to respond to mouse clicks
' on the tray icon.
If button = 1 Then
txtStatus.Text = "Left Click" & vbCrLf & txtStatus.Text
Else
txtStatus.Text = "Right Click" & vbCrLf & txtStatus.Text
End If
End Sub
Private Sub ZTray1_DblClick(button As Integer)
' This prints the text of which button was double-clicked
' to give an example of how to respond to mouse clicks
' on the tray icon.
If button = 1 Then
txtStatus.Text = "Double Left Click" & vbCrLf & txtStatus.Text
Else
txtStatus.Text = "Double Right Click" & vbCrLf & txtStatus.Text
End If
End Sub