|
-
Mar 28th, 2000, 05:15 AM
#1
Thread Starter
Addicted Member
is there a way to return the current object that has the focus? for example when the user hits F1, it says what the current control/object they are in is?
thanks,
Thai
-
Mar 28th, 2000, 05:43 AM
#2
transcendental analytic
Set the form.keypreview=true, then insert this to your form:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 112 Then MsgBox Me.ActiveControl.Name
End Sub
Hope it works!
-
Mar 29th, 2000, 02:45 AM
#3
New Member
You can also use the api call GetFocus(). It returns a handle to the control that is currently in focus. You can use other api calls to get the name.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|