Write ID ID identification procedures with BCB

zhaozj2021-02-17  51

// Buttons Click Event, create a input box Edit1 and a tab Label1 and a button Button1Void __fastcall tform1 :: Button1click (Tobject * sender) {Ansistring A, B, C, D, F; Ansistring EditText = Edit1-> Text; int E; e = strlen (editText.c_str ()); if (e == 18) {edit1-> selstart = 6; edit1-> selLength = 4; a = edit1-> seltext; edit1-> selstart = 10; edit1-> selLength = 2; b = edit1-> seltext; edit1-> selstart = 12; edit1-> selLength = 2; c = edit1-> seltext; edit1-> selstart = 16; edit1-> selLength = 1 ; d = edit1-> seltext; if (STRTOINT (D)% 2) == 1) {f = "male";} else {f = "female";} label1-> caption = "You is" a "Year" B "Month" C "Niye!" F "Sex!" Trim (INTTOSTR (E)) "Document No.!"; Return;} IF (E == 15) {Edit1- > Selstart = 6; edit1-> sellength = 2; a = "19" edit1-> seltext; edit1-> selstart = 8; edit1-> selLength = 2; b = edit1-> seltext; edit1-> sleelstart = 10 ; Edit1-> selLength = 2; c = edit1-> seltext; edit1-> selstart = 14; edit1-> selLength = 1; D = Edit1-> SELTEXT; IF ((STRTOINT (D)% 2) == 1) {f = "male";} else {f = "female";} label1-> caption = "you is" a "year" b "month" C "birthday!" f "sex!" Trim (INTSTOSTR (E)) "Delivery number!"; Return;} showMessage ("Enter ID number is incorrect!");

转载请注明原文地址:https://www.9cbs.com/read-29431.html

New Post(0)