Sub MsgBoxParams_Progress()
Dim pr As TBSMsgBoxParams
'pr.Icon = ExtractIcon(Application.HinstancePtr, GetSysDir & "\shell32.dll", 220)
pr.Icon = Sheet2.BSImageList1.ListImages(0).HIcon
pr.BackColor = RGB(200, 10, 10)
pr.ForeColor = vbYellow
pr.TimerStruct.bAddProgress = True
pr.TimerStruct.nDuration = 30 ' seconds
pr.TimerStruct.nTimerCountDown = 0
pr.TimerStruct.bStopProgress = False
pr.TimerStruct.nInterval = 1000 ' 1 second
pr.TimerStruct.nExpireButtonClick_ID = ID_YES
pr.TimerStruct.nDisplayOnButton_ID = ID_CANCEL
Dim x, s
s = "T«i sÏ híng dÉn c¸c b¹n tïy biÕn hµm MessageBox víi hµm MsgBoxParams cña BSAC trong %d gi©y n÷a."
s = s & Chr(13) & "- HiÓn thÞ chuçi Unicode"
s = s & Chr(13) & "- Thay ®æi mµu nÒn, ch÷"
s = s & Chr(13) & "- HiÓn thÞ thanh Progress ®Ó ch¹y thêi gian."
s = s & Chr(13) & "- Thay ®æi Icon"
x = MsgBoxParams(s, VbMsgBoxStyle.vbInformation + VbMsgBoxStyle.vbYesNoCancel, "Tïy biÕn víi MsgBox", pr)
MsgBoxW x, vbInformation, "MsgBoxParams"
End Sub
|