鼠标事件

问题描述:

我开始学习如何在vb.net中进行鼠标事件,而我在msdn上看到的第一个地方有一些代码可以使我滚动.问题是我复制并粘贴了代码,并得到了三个我不理解的错误.好像我缺少图书馆 或我不知道从哪里开始的帮助将不胜感激.

I'm starting to learn how to do mouse events in vb.net and the first place I looked on msdn had a bit of code to get me rolling. Problem is I copy and pasted the code and get a three errors that I don't understand. It seems as though I'm missing a library or something I don't know where to start any help would be appreciated.

加载"找不到

"TextBox1";没有声明

"TextBox1" is not declared

"System.MouseEventArgs";未定义

"System.MouseEventArgs" is not defined

公共类Module1
Public Class Module1

VBnoob101,

Hi VBnoob101,

我创建了一个演示并从侧面再现了您的问题,打开Form1.vb [Design]并将文本框控件拖到设计中.

I create a demo and reproduce your issue on my side, open the Form1.vb[Design] and drag textbox control to the design.

然后单击Form1->事件->选择负载->选择加载方式.

Then click Form1 -> event -> select load -> select load method.

与TextBox1.MouseDown方法相同.

The same as TextBox1.MouseDown Method.

最诚挚的问候,

吴可乐