有可能吗?例如,
Private Sub inputno_tb_MouseDown(sender As Object, e As MouseEventArgs)
'My code
End Sub
Private Sub stacker1apcs_tb_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs)
'Calling Private Sub inputno_tb_MouseDown
End Sub
答案 0 :(得分:0)
当然可以这样做:
Private Sub inputno_tb_MouseDown(sender As Object, e As MouseEventArgs)
'My code
End Sub
Private Sub stacker1apcs_tb_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs)
inputno_tb_MouseDown(sender, MouseEventArgs.Empty)
End Sub
如果您在代码中使用sender
,则可能需要将其更新为stacker1apcs_tb
,或者您喜欢的任何内容。