how the control got focus


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: how the control got focus

  1. #1
    NSiddiqui@fcleasing.com Guest

    how the control got focus




    <br><font size=1 face="sans-serif">Anyone know if there's a way to determine (in code) how say, a textbox, got focus....through mouse-click or tab!!</font>

  2. #2
    Arthur Wood Guest

    Re: how the control got focus


    No way, and why should it matter?

    Arthur Wood


    NSiddiqui@fcleasing.com wrote:
    >
    >
    >
    ><br><font size=1 face="sans-serif">Anyone know if there's a way to determine

    (in code)
    >how say, a textbox, got focus....through mouse-click or tab!!</font>



  3. #3
    NSiddiqui@fcleasing.com Guest

    Re: how the control got focus




    <br><font size=1 face="sans-serif">Automatic scrolling on a long data-entry page as you are tabbing through the boxes. &nbsp;Having code in the GotFocus event to trigger scrolling does not spare MouseClick-GotFocus, which can be unnerving</font>

  4. #4
    Paul Marshall Guest

    Re: how the control got focus

    On 21 Dec 2000 11:34:44 -0800, NSiddiqui@fcleasing.com wrote:

    »<br><font size=1 face="sans-serif">Anyone know if there's a way
    » to determine (in code) how say, a textbox, got focus....through
    »mouse-click or tab!!</font>


    Private Declare Function GetAsyncKeyState Lib "user32" _
    (ByVal vKey As Long) As Integer
    Private Const VK_LBUTTON = &H1

    Private Sub Text1_GotFocus()
    If GetAsyncKeyState(VK_LBUTTON) And &H8000& Then
    Debug.Print "Left click on Text1."
    End If
    End Sub

    --
    Paul Marshall
    pmarshal@vulcraft-al.com

  5. #5
    Karl E. Peterson Guest

    Re: how the control got focus

    It's somewhat customary, in some circles, to have a textbox highlight its entire
    contents when tabbed to, but not when clicked on.
    --
    http://www.mvps.org/vb


    "Arthur Wood" <wooda@saic-trsc.com> wrote in message news:3a426505$1@news.devx.com...
    >
    > No way, and why should it matter?
    >
    > Arthur Wood
    >
    >
    > NSiddiqui@fcleasing.com wrote:
    > >
    > >
    > >
    > ><br><font size=1 face="sans-serif">Anyone know if there's a way to determine

    > (in code)
    > >how say, a textbox, got focus....through mouse-click or tab!!</font>

    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center