How do I make it go left instead of right with a stopping point?

喜夏-厌秋 提交于 2019-12-13 03:05:37

问题


Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
    'Timer run from left to right to the number of input
     PictureBox1.Location = New Point(PictureBox1.Location.X + TextBox1.Text, PictureBox1.Location.Y)
End Sub

This is going right with no stopping point.


回答1:


What about subtracting that TextBox value from the previous X position instead of adding it?

Adding to an X coordinate will move the picture to the right, of course.



来源:https://stackoverflow.com/questions/49216068/how-do-i-make-it-go-left-instead-of-right-with-a-stopping-point

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!