Create Dynamic Text Styling Given Text Using Visual Programming


Procedure : Create the From using Visual basic tool create one text box for Enter the name one Combo box get the input font type and single list box for getting font size value and three check box for font underline ,bold , italics, Finally create the two command button for change color and change everything. Write the source code for there command button dynamic text styling
Output of the Dynamic text styling
Dynamic Text Styling Given Text Using Combo button list buttonSource CODE Visual programming Lap Dynamic Text styling
Private Sub Command1_Click()
End Sub

Private Sub Command2_Click()
Dim font As String
Dim size As Integer
font = Combo1.Text
size = List1.Text
Text1.font = font
size = Val(List1.Text)
Text1.FontSize = size
Text1.ForeColor = vbcolor.Color
If Check1.Value = 1 Then
Text1.FontUnderline = True
End If
If Check2.Value = 1 Then
Text1.FontBold = True
End If
If Check3.Value = 1 Then
Text1.FontItalic = True
End If
End Sub

No comments:
Write comments