'Open
New Project and put a textbox 'Write down this code on form Private Sub Text1_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single) Dim t As Integer t = Rnd * 5 Select Case t Case 0 Text1.BackColor = vbWhite Text1.ForeColor = vbBlack Case 1 Text1.BackColor = vbGreen Text1.ForeColor = vbWhite Case 2 Text1.BackColor = vbRed Text1.ForeColor = vbCyan Case 3 Text1.BackColor = vbBlue Text1.ForeColor = vbYellow Case 4 Text1.BackColor = vbYellow Text1.ForeColor = vbBlue End Select End Sub |