|
Option Explicit
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC _
As Long, ByVal x As Long, ByVal y As Long, ByVal _
nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC _
As Long, ByVal xSrc As Long, ByVal ySrc As Long, _
ByVal dwRop As Long) As Long
Private Sub Form_Load()
lblHinweis = ""
DoEvents
End Sub
Public Sub gSubVisiblePicture(ByVal lngBackColor As Long, ByVal _
lngForeColor As Long, ByVal lngFontBold As Boolean)
With Picture1
.AutoRedraw = True
.FontBold = lngFontBold
.BackColor = lngBackColor
.ForeColor = lngForeColor
.DrawMode = 10
.FillStyle = 0
.ScaleWidth = 100
End With
End Sub
Public Sub gSubUpdateStatus(ByVal lngProzent As Long)
Dim Result As Long, strTxt As String
Const SRCCOPY = &HCC0020
With Picture1
If lngProzent > .ScaleWidth Then
lngProzent = .ScaleWidth
End If
strTxt = Format$(CLng((lngProzent / .ScaleWidth) * 100)) + "%"
.Cls
.CurrentX = (.ScaleWidth - .TextWidth(strTxt)) \ 2
.CurrentY = (.ScaleHeight - .TextHeight(strTxt)) \ 2
Picture1.Print strTxt
Picture1.Line (0, 0)-(lngProzent, .ScaleHeight), .ForeColor, BF
Result = BitBlt(.hDC, 0, 0, .ScaleWidth, .ScaleHeight, _
.hDC, 0, 0, SRCCOPY)
End With
DoEvents
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, _
UnloadMode As Integer)
If UnloadMode = 0 Then Cancel = 1: Exit Sub
End Sub
|
|