導航:首頁 > 編程語言 > vb代碼判斷性別

vb代碼判斷性別

發布時間:2025-02-13 02:02:56

㈠ 用vb根據身份證號提取其中的省份,出生日期,性別,校驗碼的代碼,怎麼寫啊,要具體的正確的,再懸賞2

Private Sub Command1_Click()

Select Case Mid(Trim(Text1.Text), 1, 2)

Case 11

Text2.Text = "北京市"

Case 12

Text2.Text = "天津市"

Case 13

Text2.Text = "河北省"

Case 14

Text2.Text = "山西省"

Case 15

Text2.Text = "內蒙古自治區"

Case 21

Text2.Text = "遼寧省"

Case 22

Text2.Text = "吉林省"

Case 23

Text2.Text = "黑龍江省"

Case 31

Text2.Text = "上海市"

Case 32

Text2.Text = "江蘇省"

Case 33

Text2.Text = "浙江省"

Case 34

Text2.Text = "安徽省"

Case 35

Text2.Text = "福建省"

Case 36

Text2.Text = "江西省"

Case 37

Text2.Text = "山東省"

Case 41

Text2.Text = "河南省"

Case 42

Text2.Text = "湖北省"

Case 43

Text2.Text = "湖南省"

Case 44

Text2.Text = "廣東省"

Case 45

Text2.Text = "廣西壯族自治區"

Case 46

Text2.Text = "海南省"

Case 50

Text2.Text = "重慶市"

Case 51

Text2.Text = "四川省"

Case 52

Text2.Text = "貴州省"

Case 53

Text2.Text = "雲南省"

Case 54

Text2.Text = "西藏自治區"

Case 61

Text2.Text = "陝西省"

Case 62

Text2.Text = "甘肅省"

Case 63

Text2.Text = "青海省"

Case 64

Text2.Text = "你喜歡回族自治區"

Case 65

Text2.Text = "新疆維吾爾自治區"

Case 71

Text2.Text = "台灣省"

Case 72

Text2.Text = "香港特別行政區"

Case 73

Text2.Text = "澳門特別行政區"

End Select

Text3.Text = Mid(Text1.Text, 7, 8)

Text4.Text = IIf(Val(Mid(Text1.Text, 17, 1)) Mod 2 = 0, "女", "男")

Text5.Text = Mid(Text1.Text, 18, 1)

End Sub

㈡ vb通過輸入身份證號碼顯示性別

str_id = input("請輸入身份證號碼:")
gender = int(mid(str_id,17,1))

if gender % 2 =1
MsgBox "男"
else
MsgBox "女"

閱讀全文

與vb代碼判斷性別相關的資料

熱點內容
bat只獲取文件名 瀏覽:140
帖子app有哪些 瀏覽:701
windowsxp中工具菜單 瀏覽:663
43歲學編程怎麼樣 瀏覽:721
oracle如何清空表數據 瀏覽:856
lifi網路如何 瀏覽:744
如何利用jspwebser 瀏覽:188
在線調試jses6 瀏覽:834
javascript實現指定行列的表格 瀏覽:55
安裝驅動程序下載 瀏覽:660
小米平板共享電腦文件夾在哪裡 瀏覽:977
免費的電腦文件列印軟體 瀏覽:262
pdf文件名長度有限制嗎 瀏覽:813
暗黑破壞神2atma505圖文教程 瀏覽:373
蘋果手機怎麼文件形式重命名 瀏覽:83
沈陽如何用app辦理個人養老 瀏覽:698
ps鍵盤教程 瀏覽:145
四個excel文件怎麼合並 瀏覽:477
如何將手機視頻導入文件管理 瀏覽:381
cfile讀取多個文件 瀏覽:138

友情鏈接