laatzen/Pruef2000/source/frmProgressCancel.frm
2021-10-01 11:11:04 +02:00

100 lines
2.4 KiB
Plaintext

VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0"; "mscomctl.ocx"
Begin VB.Form frmProgressCancel
Caption = "Pruef2000"
ClientHeight = 1965
ClientLeft = 60
ClientTop = 345
ClientWidth = 4890
LinkTopic = "Form1"
ScaleHeight = 1965
ScaleWidth = 4890
StartUpPosition = 3 'Windows-Standard
Begin VB.Timer Timer1
Left = 300
Top = 1440
End
Begin MSComctlLib.ProgressBar ProgressBar1
Height = 315
Left = 0
TabIndex = 2
Top = 960
Width = 4875
_ExtentX = 8599
_ExtentY = 556
_Version = 393216
Appearance = 1
End
Begin VB.CommandButton cmdCancel
Caption = "Abbrechen"
Height = 435
Left = 1740
TabIndex = 0
Top = 1440
Width = 1335
End
Begin VB.Label lblMessage
Alignment = 2 'Zentriert
BorderStyle = 1 'Fest Einfach
Height = 915
Left = 0
TabIndex = 1
Top = 0
Width = 4875
End
End
Attribute VB_Name = "frmProgressCancel"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public m_blnAbbruch As Boolean
Public m_iProgressPercent As Integer
Private Sub cmdCancel_Click()
cmdCancel.Enabled = False
m_blnAbbruch = True
End Sub
Private Sub Form_Load()
m_blnAbbruch = False
cmdCancel.Enabled = True
ProgressBar1.Visible = False
End Sub
Public Sub SetMessage(strText As String)
lblMessage.Caption = strText
End Sub
Public Sub StartProgress()
ProgressBar1.Visible = True
ProgressBar1.Max = 100
Timer1.Interval = 500
Timer1.Enabled = True
End Sub
Public Sub StopProgress()
ProgressBar1.Visible = False
Timer1.Enabled = False
End Sub
Private Sub Form_Resize()
lblMessage.Left = 0
lblMessage.Top = 0
lblMessage.Width = Me.ScaleWidth
cmdCancel.Left = (Me.ScaleWidth - lblMessage.Width) / 2
End Sub
Private Sub Timer1_Timer()
m_iProgressPercent = m_iProgressPercent + 5
If m_iProgressPercent > 100 Then
m_iProgressPercent = 0
End If
ProgressBar1.value = m_iProgressPercent
End Sub