Solved

Finding the focus

Posted on 2006-10-25
2
249 Views
Last Modified: 2010-04-23
Hello,

I am trying to write some code that will evaluate where the focus is currently with a true/false.  something like this.....

If textbox1.focus = true then
end if

The above will not work for me though, any ideas?

Thanks!

-Navicerts
0
Comment
Question by:Navicerts
2 Comments
 
LVL 17

Accepted Solution

by:
ZeonFlash earned 500 total points
ID: 17806742
Try using the form's ActiveControl property:

If textbox1 Is Me.ActiveControl Then
End If
0
 
LVL 7

Author Comment

by:Navicerts
ID: 17806856
That worked great, thank you!
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to remove double quotes from a string in VB.Net 5 48
VB.Net - TypeInitializer Error 25 28
VB.net and sql server 4 36
MailAddress in vb 4 16
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question