如果lKeyAscii.Equals(13)那么 System.Windows.Forms.SendKeys.Send(" {TAB}") lKeyAscii = 0 结束如果 ''处理的标志是关键是ASCII 0 e.Handled = lKeyAscii.Equals(0) End Sub Hows this? Private Sub ComboBoxFindStr_KeyPress(ByVal ...snipDim lKeyAscii As Short = Asc(e.KeyChar) ''make CR work like TABIf lKeyAscii.Equals(13) ThenSystem.Windows.Forms.SendKeys.Send("{TAB}")lKeyAscii = 0End If ''flag as handled is key is ASCII 0e.Handled = lKeyAscii.Equals(0) End Sub 这个怎么样? Private Sub ComboBoxFindStr_KeyPress(ByVal ... snip Dim lKeyAscii As Short = Asc(e.KeyChar) ''让CR像TAB一样工作 如果lKeyAscii.Equals(13)那么 System.Windows.Forms.SendKeys.Send(" {TAB}") lKeyAscii = 0 结束如果 ''处理的标志是关键是ASCII 0 e.Handled = lKeyAscii.Equals( 0) 结束子 Hows this? Private Sub ComboBoxFindStr_KeyPress(ByVal ...snipDim lKeyAscii As Short = Asc(e.KeyChar) ''make CR work like TABIf lKeyAscii.Equals(13) ThenSystem.Windows.Forms.SendKeys.Send("{TAB}")lKeyAscii = 0End If ''flag as handled is key is ASCII 0e.Handled = lKeyAscii.Equals(0) End Sub JM 那里很多,但对我来说这是(没有命名空间)最好的 dotNet一个。 Cor JM There are a lot, however for me is this (without the namespace) the nicestdotNet one. Cor 这篇关于是不是有更多的DotNet方法来比较一个角色,看它是否是一个CR。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-24 11:14