'''
Dim sender = args(0)
Dim e = args(1)
Forms("扫描监控").Controls("Label1").Text = "键盘按下, " & e.KeyData.ToString() & " 键码:" & Convert.ToString(e.KeyValue)
Output.Show(e.KeyData.ToString())
Select Case e.KeyData.ToString().Length
Case 1
Vars("按键暂存") =Vars("按键暂存") & e.KeyData.ToString()
Case 2
If e.KeyData.ToString().Contains("D")
Vars("按键暂存") =Vars("按键暂存") & e.KeyData.ToString().Replace("D","")
End If
End Select
Select Case e.KeyData.ToString()
Case "Return"
Output.Show(Vars("按键暂存"))
Select Case Forms("扫描监控").Controls("选择录入项").value
Case "收费扫描"
Forms("收费扫描").Controls("TextBox4").value=Vars("按键暂存").Replace("开始","").Replace("Capital","")
Forms("扫描监控").Controls("当前单号").value=Vars("按键暂存").Replace("开始","").Replace("Capital","")
Forms("扫描监控").Controls("全部单号").value=Vars("按键暂存").Replace("开始","").Replace("Capital","") & vbcrlf & Forms("扫描监控").Controls("全部单号").value
Forms("收费扫描").Controls("监控提交").PerformClick()
'Sendkeys.Send(Vars("按键暂存").Replace("开始","").Replace("Capital","") & " {ENTER}")
Case "专用扫描"
Forms("专用扫描").Controls("TextBox4").value=Vars("按键暂存").Replace("开始","").Replace("Capital","")
Forms("扫描监控").Controls("当前单号").value=Vars("按键暂存").Replace("开始","").Replace("Capital","")
Forms("扫描监控").Controls("全部单号").value=Vars("按键暂存").Replace("开始","").Replace("Capital","") & vbcrlf & Forms("扫描监控").Controls("全部单号").value
Forms("专用扫描").Controls("监控提交").PerformClick()
Output.Show("ceshi chengg")
'Sendkeys.Send(Vars("按键暂存").Replace("开始","").Replace("Capital","") & " {ENTER}")
Case "退件扫描"
Forms("主页面").Controls("TextBox4").value=Vars("按键暂存").Replace("开始","").Replace("Capital","")
Forms("扫描监控").Controls("当前单号").value=Vars("按键暂存").Replace("开始","").Replace("Capital","")
Forms("扫描监控").Controls("全部单号").value=Vars("按键暂存").Replace("开始","").Replace("Capital","") & vbcrlf & Forms("扫描监控").Controls("全部单号").value
Forms("主页面").Controls("监控提交").PerformClick()
' Sendkeys.Send(Vars("按键暂存").Replace("开始","").Replace("Capital","") & " {ENTER}")
Case Else
End Select
Vars("按键暂存")="开始"
'Dim 新 As Row=Tables("扫描监控_Table1").AddNew()
'Output.Show(Vars("按键暂存").Replace("开始","").Replace("Capital","") )
'Dim dr As DataRow = DataTables("扫描监控_Table2").Find("寄件人姓名= '" & Vars("按键暂存").Replace("开始","").Replace("Capital","") & "'") '找出编号为03的产品
'If dr IsNot Nothing Then '如果找到的话
'Output.Show("是")
'新("运单编号")=dr("运单号")
'Else
'新("运单编号")=Vars("按键暂存").Replace("开始","").Replace("Capital","")
'Output.Show("否")
'End If
'新("备注信息")=Vars("按键暂存")
'新("操作时间")=Date.Now
'新("操作人")= Forms("扫描监控").Controls("操作人").text.Replace("当前操作人:","")
'新("操作类型")="扫码监控"
'新("货主ID")=_货主ID
'Vars("按键暂存")="开始"
''Functions.AsyncExecute("监控保存行",新)
'Case Else
'
'Select Case e.KeyData.ToString().Length
'Case 2,7
'
'Vars("按键暂存") = Vars("按键暂存") & e.KeyData.ToString().Chars( e.KeyData.ToString().Length-1)
''Replace("D","")
'Case Else
'Vars("按键暂存") = Vars("按键暂存") & e.KeyData.ToString()
'End Select
'
'If Vars("按键暂存").Length>250 Then
'Dim 新 As Row=Tables("扫描监控_Table1").AddNew()
'
'Dim dr As DataRow = DataTables("扫描监控_Table2").Find("寄件人姓名= '" & Vars("按键暂存").Replace("开始","").Replace("Capital","") & "'") '找出编号为03的产品
'If dr IsNot Nothing Then '如果找到的话
'Output.Show("是")
'新("运单编号")=dr("运单号")
'Else
'新("运单编号")=Vars("按键暂存").Replace("开始","").Replace("Capital","")
'Output.Show("否")
'End If
'新("备注信息")=Vars("按键暂存")
'新("操作时间")=Date.Now
'新("操作人")= Forms("扫描监控").Controls("操作人").text.Replace("当前操作人:","")
'新("操作类型")="扫码监控"
'新("货主ID")=_货主ID
'Vars("按键暂存")="开始"
'Functions.AsyncExecute("监控保存行",新)
'
'End If
End Select