16,554
社区成员
发帖
与我相关
我的任务
分享
Public Class Form1
Private Sub AddButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddButton.Click
Dim b As New Button With {.Text = "1号按钮"}
Me.Controls.Add(b)
AddHandler b.MouseMove, Sub(o As Object, arg As MouseEventArgs)
If arg.Button = Windows.Forms.MouseButtons.Left Then
b.Location = arg.Location
End If
End Sub
End Sub
End Class