回复 7楼hanamichi的帖子
VB.NET 和 C# 使用代码添加事件方式有差别,VB.NET 写法如下:
- Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- AddHandler Me.FpSpread1.KeyDown, AddressOf FpSpread1_KeyDown
- AddHandler Me.FpSpread1.KeyUp, AddressOf FpSpread1_keyUp
- End Sub
- Private Sub FpSpread1_KeyDown(sender As Object, e As KeyEventArgs) Handles FpSpread1.KeyDown
- End Sub
- Private Sub FpSpread1_keyUp(sender As Object, e As KeyEventArgs) Handles FpSpread1.KeyUp
- End Sub
复制代码 |