VB.NET-鼠标坐标 [英] VB.NET - Mouse Coordinates
本文介绍了VB.NET-鼠标坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个vb.net应用程序,我想知道如何在单击表单时找到指针(鼠标)的坐标.没什么可说的,所以我就这样保留它..:D
I have a vb.net application, and I want to know how to find the coordinates of the pointer (mouse) when it is clicked on the form. Not much else to say, so I'll leave it like that.. :D
谢谢
推荐答案
非常简单的代码将鼠标坐标放在文本框中
Very simple code to put the mouse coords in a text box
Private Sub Form1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseClick
Dim MPx As Point = MousePosition()
TextBox1.Text = MPx.ToString
End Sub
经过测试,
这篇关于VB.NET-鼠标坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文