且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将处理多个事件句柄的VB.NET Private Sub转换为C#?

更新时间:2023-02-17 21:30:07

在InitializeComponent()方法中(在.designer.cs文件中), add:

In InitializeComponent() method (in .designer.cs file), add:
txtCL_VL_LA.Enter += SetLAO;
txtCL_FN_LA.Enter += SetLAO;
txtCL_LN_LA.Enter += SetLAO;
txtCL_VL_LA.Leave += SetENG;
txtCL_FN_LA.Leave += SetENG;
txtCL_LN_LA.Leave += SetENG;



您可能必须小心将这些行放在代码文件中的位置。观察该文件的结构并确定每行的放置位置。


You may have to be careful as to where you put these lines in the code file. Observe the structure of this file and decide where to put each line.