請問可以幫我列出H187開頭的所有身分證號碼
或給我可以把這些列出來的程式
2006-06-11 10:19:41 · 2 個解答 · 發問者 宸濠 1 in 電腦與網際網路 ➔ 程式設計
= =我要的生產器是可以列出來的= =
2006-06-11 10:24:43 · update #1
'VB6程式碼Function IDChk(ByVal ID As String) As Boolean Dim A As Integer, B As Integer, C As Integer, S As String ID = UCase(ID): S = Left(ID, 1) If Len(ID) <> 10 Then Exit Function If (S < "A" Or S > "Z") Then Exit Function If Mid(ID, 2, 1) <> "1" And Mid(ID, 2, 1) <> "2" Then Exit Function If Not IsNumeric(Mid(ID, 3)) Then Exit Function A = InStr("ABCDEFGHJKLMNPQRSTUVXYWZIO", S) + 9 ID = CStr(A) & Mid(ID, 2) B = CInt(Mid(ID, 1, 1)) + CInt(Mid(ID, 11, 1)) For C = 2 To 10 B = B + CInt(Mid(ID, C, 1)) * (11 - C) Next C If B Mod 10 <> 0 Then Exit Function IDChk = TrueEnd FunctionPrivate Sub Command1_Click() Dim A$, S$, I&, Dr$, F& Do S = InputBox("請輸入前4碼", , "H187") If S = "" Then Exit Sub Loop While UCase(Left(S, 1)) < "A" Or UCase(Left(S, 1)) > "Z" Or Mid(S, 2, 1) < 1 Or Mid(S, 2, 1) > 2 Or Len(S) <> 4 Command1.Enabled = False F = FreeFile Dr = IIf(Right(App.Path, 1) = "\", App.Path, App.Path & "\") & "ID.Txt" AutoRedraw = True MousePointer = 11 Open Dr For Output As #F For I = 0 To 999999 A = S & Format(I, "000000") If IDChk(A) Then Print #F, A If I Mod 333 = 0 Then Print "正在檢驗: "; A: DoEvents: Cls Next Close #F Command1.Enabled = True MousePointer = 0 MsgBox "以儲存至 " & Dr, , CaptionEnd Sub我把整個專案及編譯好的程式放至以下連結(只能放7天)http://www.yousendit.com/transfer.php?action=download&ufid=46AAB60B72357656(若無法連結請直接複製網址)
2006-06-11 11:37:58 · answer #1 · answered by W.J.S. 7 · 0⤊ 0⤋
這個給你...
不知道有沒有幫助...
我是覺得不錯用啦...
http://www.cis.nctu.edu.tw/~is86007/magicshop/ROCid.html
2006-06-11 10:21:13 · answer #2 · answered by 奕辰 1 · 0⤊ 0⤋