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.TickfrmNotification.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?
I can't love GOG enough.
Yay Valve for Steam, SteamOS, Proton, gaming on Linux, Steamdeck and anything else, but offline installers, the simplicity and game preservation of GOG is even more heartwarming to me.
Can we fast-forward to the part where Microsoft makes a first-party handheld? You would think after 20 years they would learn from the mistakes of the pre-Lumia Windows Phones and the pre-Surface tablet PCs.
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
https://www.neowin.net/forum/topic/201336-vbnet-moving-a-form/Share on other sites
5 answers to this question
Recommended Posts