我该如何在vb.net中编写事件处理程序 [英] how do i code event handler in vb.net

查看:69
本文介绍了我该如何在vb.net中编写事件处理程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一种围绕事件进行编码的方法,例如用户在文本中输入了某些内容,并且当他们按Enter或单击时,应该发生一个事件,该事件将验证用户输入并将其保存到电子表格中.

i need a way to code around an event such as a user entered something in a text and when they press enter or click an event should happened that will validate the user input and save it to the spreadsheet

推荐答案

拖放一个按钮,双击该按钮,VS将为您添加Click处理程序并将您带到代码中
然后,您可以根据自己的验证规则进行验证并保存,无论它们是什么.
Drop a button on, double click the button and VS will add the Click handler for you and take you to the code
You can then validate and save according to your validation rules, whatever they happen to be.


此处 [此处 [ ^ ]第二个.乍一看,两者似乎都对您有所帮助.
Google[^] is your friend. Here''s[^] the first result and here''s[^] the second. Both appear, at a glance, to be helpful.


您还没有注意到
You haven''t noticed the Validating event[^] of the TextBox, have you?


这篇关于我该如何在vb.net中编写事件处理程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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