鼠标单击 [英] on mouse click

查看:108
本文介绍了鼠标单击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用C#编写代码
此代码应从文本框中选择一条语句,并在单击鼠标按钮时用鼠标引用时将其显示在标签上.

请咨询.

I want make code using C#
This code should select a statement from within a textbox and show it on lable when I refer to it with the mouse upon a mousebutton click.

Advice please.

推荐答案

您的问题没有多大意义.但是,听起来您想选择鼠标所在的词.您可以使用光标位置确定鼠标所在的单词,然后使用正则表达式或字符串混搭仅提取该单词.其余的显然是微不足道的.您应该尝试使用intellisense来探索要学习使用的控件的属性,并且我假设您已开始阅读基本的winforms书籍,然后才开始在此处发布.

不要让您的问题大胆.真烦人.
Your question doesn''t make much sense. However, it sounds like you want to select the word the mouse is under. You can use the cursor position to work out what word the mouse is in, and use regex or string mashing to extract just that word. The rest is, obviously, trivial. You should try to use intellisense to explore the properties of the controls you''re learning to use, and I assume you''ve worked your way through a basic winforms book before starting to post here.

Don''t make your question bold. How annoying.


这篇关于鼠标单击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆