View Single Post
  #2 (permalink)  
Old 06-21-2008, 09:43 AM
Erel's Avatar
Erel Erel is offline
Administrator
 
Join Date: Apr 2007
Posts: 3,335
Default

Which type of controls do you have on your form?
For controls that support the GotFocus event you can use something like:
Code:
Sub Globals
    'Declare the global variables here.

End Sub

Sub App_Start
    Form1.Show
    AddEvent("TextBox1",GotFocus,"GotFocus")
    AddEvent("TextBox2",GotFocus,"GotFocus")
    AddEvent("TextBox3",GotFocus,"GotFocus")
End Sub

Sub GotFocus
    form1.Text = Sender
    Sender.Color = cGreen
End Sub
Reply With Quote