home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
bp_1_94
/
bonus
/
stbar
/
child.frm
next >
Wrap
Text File
|
1993-05-24
|
2KB
|
93 lines
VERSION 2.00
Begin Form fmChild
BackColor = &H8000000F&
Caption = "StBar Example Child Form"
Height = 3045
Left = 1050
LinkMode = 1 'Source
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 2640
ScaleWidth = 5910
Top = 1125
Width = 6030
Begin Timer Timer1
Enabled = 0 'False
Interval = 100
Left = 0
Top = 0
End
Begin CommandButton Command4
Caption = "Show &progress bar"
Height = 495
Left = 600
TabIndex = 3
Top = 1920
Width = 4695
End
Begin CommandButton Command3
Caption = "toggle &visible property"
Height = 495
Left = 600
TabIndex = 2
Top = 1320
Width = 4695
End
Begin CommandButton Command2
Caption = "show &second message"
Height = 495
Left = 600
TabIndex = 1
Top = 720
Width = 4695
End
Begin CommandButton Command1
Caption = "show &first message"
Height = 495
Left = 600
TabIndex = 0
Top = 120
Width = 4695
End
End
Option Explicit
Dim iProgress As Integer
Declare Sub StBarVisible Lib "STBAR.VBX" (ByVal hWnd As Integer, ByVal iVisible As Integer)
Sub Command1_Click ()
fmMain.sbMain.Caption = "first message"
End Sub
Sub Command2_Click ()
fmMain.sbMain.Caption = "second message"
End Sub
Sub Command3_Click ()
Dim iVisible As Integer
iVisible = Not fmMain.sbMain.Visible
StBarVisible fmMain.hWnd, iVisible
fmMain.piStBar.Visible = iVisible
End Sub
Sub Command4_Click ()
iProgress = 0
Timer1.Enabled = True
End Sub
Sub Timer1_Timer ()
Dim sCaption As String
If iProgress >= 100 Then
Timer1.Enabled = False
sCaption = ""
Else
sCaption = "%" + Format$(iProgress) + "%Work in progress, " + Format$(iProgress) + "% done."
iProgress = iProgress + 2
End If
fmMain.sbMain.Caption = sCaption
End Sub