VB.NET中实现控件数组的功能
2008-12-26 13:48
471 查看
控件:几个文本框textbox
事件:TextBoxes_textchanged
代码:
Private Sub TextBoxes_TextChanged(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles TextBox1.TextChanged, _
TextBox2.TextChanged, TextBox3.TextChanged
Select Case DirectCast(sender, TextBox).Name
Case TextBox1.Name
MsgBox("The text in the first TextBox has changed")
Case TextBox2.Name
MsgBox("The text in the second TextBox has changed")
Case TextBox3.Name
MsgBox("The text in the third TextBox has changed")
End Select
End Sub
事件:TextBoxes_textchanged
代码:
Private Sub TextBoxes_TextChanged(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles TextBox1.TextChanged, _
TextBox2.TextChanged, TextBox3.TextChanged
Select Case DirectCast(sender, TextBox).Name
Case TextBox1.Name
MsgBox("The text in the first TextBox has changed")
Case TextBox2.Name
MsgBox("The text in the second TextBox has changed")
Case TextBox3.Name
MsgBox("The text in the third TextBox has changed")
End Select
End Sub
相关文章推荐
- VB.NET中实现控件数组的方法
- 使用泛型在VB.NET中实现VB6.0中的控件数组
- VB.NET实现动态加载控件数组
- 利用VB.NET Format函数实现四舍五入功能
- 不能实现或功能冲突 -- Intersoft WebUI Studio.NET 2007控件使用
- Asp.net 2.0 自定义控件开发[实现自动计算功能(AutoComputeControl)][示例代码下载续][重点推荐控件]
- [VB.NET]怎样实现MDI窗体菜单上的“窗口”菜单下面的功能
- [VB.NET]VB.NET2005中怎样实现子窗体控制父窗体的控件属性?
- VB.NET中动态添加控件数组
- 【搬运】VB.NET实现文件拖放功能
- 实现VB.Net中的文本框TextBox的按行跳转功能
- VB.net实现从ListView控件中异地获取文本内容源代码
- 数组例子2:二维数组中的行列互换和按钮控件数组实现计算器界面(暂不支持计算功能,仅界面及简单输入)
- vb.net 实现javascript中的Eval功能
- C#中实现VB.net中ReDim功能
- vb.net机房收费系统一个小功能的实现
- ASP.NET控件篇-----My97DatePicker实现OA日期记事功能
- VB.NET用Marshal.PtrToStructure 方法实现数据在数组和结构间复制
- VB.net+三层架构 实现登录功能
- [VB.NET]利用vb.net创建一个完全可编辑的DataGrid,从而实现操作Access数据库进行增,删,改的功能,前提是不用任何其他的Button