Use what tbischel suggested. Here is a sample code for a timer.
Private TickCount As Integer = 0 Private Const NUMBER_OF_SECONDS As Integer = 1 Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Me.BackColor = If(Me.BackColor = Color.White, Color.Red, Color.White) TickCount += 1 If TickCount >= NUMBER_OF_SECONDS * 1000 / Timer1.Interval Then Timer1.Stop() Me.BackColor = Color.Gray Me.TopMost = False Me.WindowState = FormWindowState.Normal End If End Sub
It will alternate between red and white and at any interval set for your timer. It will stop after all the many seconds you give it. When this is done, it sets the color to gray, removes the .TopMost flag, and returns the WindowState to its normal state.
Having said that; it is really annoying :)
source share