计划管理_读ID卡
Dim status1 As Byte
Dim a,b As Integer
Dim mypiccserial(4) As Byte '卡序列号
status1 = idr_read_once(mypiccserial(0))
If status1 = 0 Then
idr_beep(50) '2毫秒*50
a = (Convert.ToString(mypiccserial(1) * 256 * 256 * 256 + mypiccserial(2) * 256 * 256 + mypiccserial(3) * 256 + mypiccserial(4)))
b = (a Mod 256 * 256) + (INT(a /(256 * 256)) Mod 256) * 100000
Forms("窗口1").Controls("TextBox1").Value = ""
Forms("窗口1").Controls("TextBox1").Value = Format(b,"00000000")
End If
以上代码是读取ID卡序列号,并将序列号填充到窗口1的"TextBox1"文本框。
如何将以上代码设置为获取ID卡序列号的内部函数,并在计划管理窗口根据条件(如打开窗口1时)进行调用(),请各位老师指教,谢谢!!
[此贴子已经被作者于2015/2/9 11:44:47编辑过]