Results 1 to 2 of 2

Thread: Usercontrol and GotFocus Event????

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    1
    I've created a usercontrol to handle date input. It uses a maskedbox as a constituent control. When using the component in a project, the on_gotfocus() event fires as soon as the form is activated. "Built in" controls on the toolbox such as textboxes do not exhibit this behavior. How can I prevent On Gotfocus() from firing automatically???


  2. #2
    Addicted Member
    Join Date
    May 2000
    Location
    Westminster, Md.
    Posts
    163

    GotFocus

    Well if your control is the first control on the form...it's going to fire as soon as the form comes into view...Just make the TabIndex of the control something later than it is...If it's object 0 it's automatically going to get focus when the form is displayed.



    Hope that helps.

    EireDrake

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width