有人知道如何在一个简单的表格上按下鼠标光标制作文本框吗?
答案 0 :(得分:0)
在表单的MouseMove
事件处理程序中
textBox.Location = new Point(e.X, e.Y); Invalidate();
e
是MouseEventArgs
答案 1 :(得分:0)
我已经为你完成了这段代码,请查看以下答案:
Private Sub Form1_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
Label1.Text = e.X.ToString
Label2.Text = e.Y.ToString
Me.TextBox1.Location = New System.Drawing.Point(e.X + 10, e.Y + 10)
End Sub