我得到窗口在屏幕位置,但是控件的位置不是以这个为起点 Post By:2014/10/20 0:33:00 [只看该作者]
以下是控件的click事件:
Dim x As Integer Dim y As Integer x = System.Windows.Forms.Cursor.Position.X.toString() y = System.Windows.Forms.Cursor.Position.y.toString() e.Form.controls("Button2").left=x-e.form.baseform.left e.Form.controls("Button2").Top=y-e.form.baseform.top e.Form.controls("Button2").Visible=True