A) Program Design :
(B) Property(Controls Used) :
- 4 Labels and their CAPTIONS are Enter First Name,Enter Middle Name,Enter Last Name and Initial is.
- One Command Button and its CAPTION is Generate Initial
- 3 Text Boxes
(C) Attaching Code to the Object :
Private Sub Command1_Click() Dim str As String str = "" str = Mid(Trim(Text1.Text), 1, 1) + "." str = str + Mid(Trim(Text2.Text), 1, 1) + "." str = str + Mid(Trim(Text3.Text), 1, 1) + "." Label4.Caption = "Initial is - " + str End Sub |
D) Output :
- ====================================================================
===========================================================
No comments:
Post a Comment