ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   show form for very short time (https://www.excelbanter.com/excel-programming/371291-show-form-very-short-time.html)

Bill Kuunders

show form for very short time
 
Is there a way to flash a short message using a form for a time far shorter
than a second?
Thanks
Bill Kuunders



Jake Marx[_3_]

show form for very short time
 
Hi Bill,

Bill Kuunders wrote:
Is there a way to flash a short message using a form for a time far
shorter than a second?


Yes - you can use the GetTickCount API function to do something like that:

Private Declare Function GetTickCount Lib "kernel32" () As Long

Sub demo()
Dim lCount As Long

frmMessageBox.Show vbModeless
lCount = GetTickCount

Do While GetTickCount < (lCount + 500)
DoEvents
Loop

Unload frmMessageBox
End Sub

--
Regards,

Jake Marx
www.longhead.com


[please keep replies in the newsgroup - email address unmonitored]



Bill Kuunders

show form for very short time
 
Thank You very much Jake.


"Jake Marx" wrote in message
...
Hi Bill,

Bill Kuunders wrote:
Is there a way to flash a short message using a form for a time far
shorter than a second?


Yes - you can use the GetTickCount API function to do something like that:

Private Declare Function GetTickCount Lib "kernel32" () As Long

Sub demo()
Dim lCount As Long

frmMessageBox.Show vbModeless
lCount = GetTickCount

Do While GetTickCount < (lCount + 500)
DoEvents
Loop

Unload frmMessageBox
End Sub

--
Regards,

Jake Marx
www.longhead.com


[please keep replies in the newsgroup - email address unmonitored]






All times are GMT +1. The time now is 12:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com