導航:首頁 > 編程語言 > 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代碼判斷性別相關的資料

熱點內容
linuxapache集群 瀏覽:406
代碼修改form名稱 瀏覽:507
華為g9是安卓系統嗎 瀏覽:688
貝葉斯網路構建方法 瀏覽:197
模仿網站素材哪裡來 瀏覽:488
小程序選擇器時間 瀏覽:47
win10任務管理器頻率 瀏覽:583
禹城市網路傳媒怎麼樣 瀏覽:629
招商applepay免密 瀏覽:828
超市收銀數據怎麼核對 瀏覽:716
win10電腦壁紙問題 瀏覽:778
右鍵單擊桌面文件無反應 瀏覽:941
ftp文件名帶時間 瀏覽:547
java面試題抽象類和介面有什麼區別 瀏覽:984
mac電腦壓縮文件到windows 瀏覽:258
如何刪除qq最近聯系人 瀏覽:228
iphone6關閉單手 瀏覽:831
3扣1用什麼app 瀏覽:387
簡單內核程序 瀏覽:675
怎麼建立桌面文件袋 瀏覽:257

友情鏈接