討論區快速選單
知識庫快速選單
討論區最近新進100則主題 掌握Salesforce雲端管理秘訣
[ 回上頁 ] [ 討論區發言規則 ]
如何把vb程式改成evb
更改我的閱讀文章字型大小
作者 : hans3388(singer358)
[ 貼文 1 | 人氣 0 | 評價 0 | 評價/貼文 0 | 送出評價 0 次 ] 
[ 給個讚 ]  [ 給個讚 ]  [ 回應本文 ]  [ 發表新文 ]  [ 回上頁 ] [ 回討論區列表 ] [ 回知識入口 ]
2011/6/8 下午 07:16:46
程式如下
Const BUFFERSIZE As Integer = 2048
Const NOREADERS As String = "no readers found"
Dim ReadersName As String
Dim ReadersNameLength As Long
Dim ReadersNameArray As Variant
Dim ReaderCount As Integer
Dim Err As Integer
Dim SCARDCONTEXT As Long
Dim ReaderState As SCARD_READERSTATEA
Dim CurrentReaderName As String
Dim CurrentProtocol As Long
Dim CardHandle As Long
Dim CurrentCardState As Long
Dim ioRequest As SCARD_IO_REQUEST
Dim Data(0 To 255) As Byte
Private Sub ConnectBtn_Click()
CurrentReaderName = ReaderBox.Text
ReaderState.szReader = CurrentReaderName + vbNullChar
ReaderState.dwCurrentState = 0
Check if the card is inserted
Result = CasGetStatusChangeA(SCARDCONTEXT, lngTimeout, ReaderState, 1)
If Result = SCARD_S_SUCCESS Then
Output "Get Status Change Success"
If ReaderState.dwEventState And SCARD_STATE_PRESENT Then
CurrentCardState = 1
Else
CurrentCardState = 0
End If
Else
Output "Get Status Change Fail"
MsgBox "讀卡機未連結", 48, "Error"
End If
If CurrentCardState = 1 Then
Connect to the card
CurrentProtocol = 0
CardHandle = lngNull
Result = CasConnectA(SCARDCONTEXT, CurrentReaderName, SCARD_SHARE_SHARED, _ SCARD_PROTOCOL_Tx, CardHandle, CurrentProtocol)
If Result = SCARD_S_SUCCESS Then
Output "Connected to the card Success"
If CurrentProtocol And SCARD_PROTOCOL_SYNC Then
Output "The card is a memory card"
End If
End If
End If
End Sub
Private Sub DisconnectBtn_Click()
Result = CasDisconnect(CardHandle, SCARD_EJECT_CARD)
If Result = SCARD_S_SUCCESS Then
Output "Disconnected to the card Success"
Else
Output "Disconnected to the card Fail"
End If
End Sub
Private Sub Command2_Click()
'驗證帳號
Dim a As Long
Dim b, c, d, e, f, g, h, i, j, k, l, m, n, o As Long
a = Val(txtid)
Text1.Text = a
b = a Mod 100
Text2.Text = b
c = a \ 100
d = c Mod 100
Text3.Text = d
e = c \ 100
f = e Mod 100
Text4.Text = f
g = e \ 100
h = g Mod 100
Text5.Text = h
i = g \ 100
j = i Mod 100
Text6.Text = j
k = Val(Data(0))
If k = j Then
'MsgBox "核對帳號第ㄧ組正確", 48, "Right"

 板主 : 徵求中
 > WinCE/eVB - 討論區
 - 最近熱門問答精華集
 - 全部歷史問答精華集
 - WinCE/eVB - 知識庫
  ■ 全站最新Post列表
  ■ 我的文章收藏
  ■ 我最愛的作者
  ■ 全站文章收藏排行榜
  ■ 全站最愛作者排行榜
  ■  月熱門主題
  ■  季熱門主題
  ■  熱門主題Top 20
  ■  本區Post排行榜
  ■  本區評價排行榜
  ■  全站專家名人榜
  ■  全站Post排行榜
  ■  全站評價排行榜
  ■  全站人氣排行榜
 請輸入關鍵字 
  開始搜尋
 
Top 10
評價排行
WinCE/eVB
1 Jones 300 
2 Minro.X 170 
3 小安東尼 80 
4 buier 70 
5 ivan 40 
6 阿山哥 40 
7 alvin 40 
8 網路棋兵 40 
9 小聖 40 
10 sayha 40 
WinCE/eVB
  專家等級 評價  
  一代宗師 10000  
  曠世奇才 5000  
  頂尖高手 3000  
  卓越專家 1500  
  優秀好手 750  
Microsoft Internet Explorer 6.0. Screen 1024x768 pixel. High Color (16 bit).
2000-2018 程式設計俱樂部 http://www.programmer-club.com.tw/
1.464844E-02