by Amdan Mohamed (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 11th February 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)
This code can manage the behavior or setting of components placed on the form in a very short manner
'Prepared by Amdan Mohamed
'Faculty of Accountancy, Northern University of Malaysia
'[email protected], 2/11/2003
'This code can be implemented at any components and controls
'place textbox as text1 on the form1 an copy it for 6 times
'place label as label1 on the form1 an copy it for 6 times or as many as you want
'it has no problem if textbox or label is bind to recordset of a database
Private Sub Text1_GotFocus(Index As Integer)
Dim i As Integer
For i = 0 To 5
If i = Index Then
Text1(Index).BackColor = vbCyan
Text1(Index).FontBold = True
Label1(Index).BackColor = vbYellow
Label1(Index).FontUnderline = True
Else
Text1(i).BackColor = &H8000000F
Text1(i).FontBold = False
Label1(i).BackColor = &H8000000F
Label1(i).FontUnderline = False
End If
Next
End Sub
No comments have been posted about This code can manage the behavior or setting of components placed on the form in a very short manne. Why not be the first to post a comment about This code can manage the behavior or setting of components placed on the form in a very short manne.