代码之家  ›  专栏  ›  技术社区  ›  Ruby_3.7

我如何让它在停车点向左而不是向右?

  •  0
  • Ruby_3.7  · 技术社区  · 7 年前
    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
    

    这是一条没有终点的路。

    1 回复  |  直到 7 年前
        1
  •  0
  •   ulmer-a    7 年前

    从之前的X位置减去该文本框值,而不是将其相加,怎么样?

    当然,添加到X坐标会将图片向右移动。