I have a timer to move a form up frmNotification.Height in ShowTime milliseconds..
Private WithEvents tmrTimer As New System.Windows.Forms.Timer
... (called in a function)
tmrTimer.Interval = Math.Floor(ShowTime / frmNotification.Height)
tmrTimer.Enabled = True
...
Private Sub tmrTimer_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tmrTimer.Tick
frmNotification.Top -= 1
If (frmNotification.Top = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height - frmNotification.Height - 28) Then
tmrTimer.Enabled = False
End If
End Sub
But it goes very slow no matter what the timer is set at.. is there another way I could move it up without blocking (a loop in another thread maybe?) or do I have to use some kind of high resolution timer?
Question
todd
I have a timer to move a form up frmNotification.Height in ShowTime milliseconds..
But it goes very slow no matter what the timer is set at.. is there another way I could move it up without blocking (a loop in another thread maybe?) or do I have to use some kind of high resolution timer?
Edited by todd`Link to comment
Share on other sites
5 answers to this question
Recommended Posts