SelectActiveTextThis is a featured page

Public Sub SelectActiveText()
'Call from the GetFocus events for all the TextBoxes and
'ComboBoxes with Style=0 - Dropdown Combo.
'Select only if tabbed not clicked.
Dim ctrl As Control
Const KEY_LBUTTON = &H1

On Error GoTo SelectActiveTextTrap
Set ctrl = Screen.ActiveControl
If IsLButtonDown() Then
ctrl.SelLength = 0
Else
ctrl.SelStart = 0
ctrl.SelLength = Len(ctrl.Text)
End If
SelectActiveTextTrap:
Exit Sub
End Sub


No user avatar
2buck
Latest page update: made by 2buck , Nov 30 2006, 11:23 PM EST (about this update About This Update 2buck Edited by 2buck


view changes

- complete history)
Keyword tags: VB 6 (edit keyword tags)
More Info: links to this page

Anonymous  (Get credit for your thread)


There are no threads for this page.  Be the first to start a new thread.

Related Content

  (what's this?Related ContentThanks to keyword tags, links to related pages and threads are added to the bottom of your pages. Up to 15 links are shown, determined by matching tags and by how recently the content was updated; keeping the most current at the top. Share your feedback on Wetpaint Central.)