Community discussion forum

Don't lose focus in UserControls

This is a comment thread discussing Don't lose focus in UserControls
  • 9 years ago

    This thread is for discussions of Don't lose focus in UserControls.

  • Advertisement

    Simply the fastest line-level profiler for .NET ever

    “The low overhead means it has minimal impact on the execution of my program”
    Mark Everest, Development Team Leader, Renault F1 Team Ltd.

    Try out the new ANTS Profiler 4 for yourself. Download your 14-day trial now

  • 3 years ago

    It appears that this is handled inconsistently in various contexts.
    I was developing an ActiveX control in VB 6.0. The control contains a TextBox
    and I wanted to process the enter key. The control is a schedule keeper -
    type 'monday at 8am for 2 hours' and hit return, and it sets that.


    The control works fine in the VB IDE environment - clicking GO loads the form on a page
    in IE and everything works as desired


    Now I make the control and put it on a form in Access 97. Boom - the keypress event
    never happens for the enter key. Instead the focus gets shifted to next in the tab order.
    I finally made a workaround - I figured out a set of conditions under which I could figure
    out that I'd lost focus because of this, and used the exitfocus event.

Post a reply

Enter your message below

Sign in or Join us (it's free).