身份證 2010 10 13
身份證 2010 10 13
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim CHKVAL As Byte
If TextBox1.Text.Length = 10 And IsNumeric(Microsoft.VisualBasic.Right(TextBox1.Text, 9)) Then
Label2.Text = ""
CHKVAL = Mid(TextBox1.Text, 2, 1)
Label2.Text = "輸入身份證為:"
Label2.Text &= IIf(CHKVAL = "1", "男性", "女性")
Else
MsgBox("請檢查輸入資料", MsgBoxStyle.Information + MsgBoxStyle.OkOnly, "錯誤訊息")
TextBox1.Clear()
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
End Class
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim CHKVAL As Byte
If TextBox1.Text.Length = 10 And IsNumeric(Microsoft.VisualBasic.Right(TextBox1.Text, 9)) Then
Label2.Text = ""
CHKVAL = Mid(TextBox1.Text, 2, 1)
Label2.Text = "輸入身份證為:"
Label2.Text &= IIf(CHKVAL = "1", "男性", "女性")
Else
MsgBox("請檢查輸入資料", MsgBoxStyle.Information + MsgBoxStyle.OkOnly, "錯誤訊息")
TextBox1.Clear()
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
End Class
這個論壇的權限:
您 無法 在這個版面回復文章