Foxtable(狐表)用户栏目专家坐堂 → [求助]KEYDOWN事件!


  共有1691人关注过本帖平板打印复制链接

主题:[求助]KEYDOWN事件!

帅哥哟,离线,有人找我吗?
xietan417
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:三尾狐 帖子:721 积分:6391 威望:0 精华:0 注册:2011/6/26 11:45:00
[求助]KEYDOWN事件!  发帖心情 Post By:2017/1/14 11:35:00 [只看该作者]

Dim n As WinForm.ComboBox = e.Form.Controls("ComboBox1")
Dim b As WinForm.TextBox = e.Form.Controls("TextBox1")
Dim nt As WinForm.Label = e.Form.Controls("Label1")
Dim nt1 As WinForm.Label = e.Form.Controls("Label2")
If e.keycode = Keys.Enter   Then
    Dim dr As DataRow
    dr = DataTables("门店明细").Find("条形码 = '" & b.value & "' and 门店 = '" & n.value & "' ")
    If dr IsNot Nothing Then
        dr("tem") = 1
    Else
        MessageBox.Show("条码不存在或者门店不相符")
    End If
    e.cancel = True
    Select Case str(0)
End Select
b.Value = ""
End If

我在textbox的keydown事件里写这个代码居然还是跳到  MessageBox.Show("条码不存在或者门店不相符") 这行代码去!
但是做了一个button 去掉keycode 的部份代码却能正常判断!看不出来有什么差别啊!

 回到顶部