We have received your request and will respond promptly. Log In. Thank you for helping keep Tek-Tips Forums free from inappropriate posts. The Tek-Tips staff will check this out and take appropriate action. Click Here to join Tek-Tips and talk with other members! Already a Member? Join your peers on the Internet's largest technical computer professional community. It's easy to join and it's free.
Register now while it's still free! Already a member? HI All, I have 4 command buttons commandbutton1 - 4 on my excel 'Sheet8'. I want Bold-Font for whichever of the buttons 1 - 3 get focus. Button 4 is just a settings button that doesn't need focus, it basically Opens up a UserForm when clicked. I defined LostFocus for buttons and they work fine. They basically sort my columns for some names. Now, when i click button 1, it gets focus, Bolds out its font, sorts out my columns on name "GGG".
BUttons 2,3 work the same. But when i click button 4: 1 Last Button from looses focus, UnBolds its font. Expected 2 UserForm opens, i click OK button to close it. I want one of the 3 buttons to either maintain its bold text, or regain focus back on closing UserForm, dunno how to identify the last active CommandButton before clicking Commandbutton4.
How do i do that? Welcome to VBForums Mamu Rather than replying to somebody elses thread that is only vaguely related and in this case 5 years old too , you should create your own thread. NET VB. Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear.
TechnologyAdvice does not include all companies or all types of products available in the marketplace. Remember Me? Advertiser Disclosure. Advanced Search. Results 1 to 11 of Thread: Find what control has focus?
Thread Tools Show Printable Version. Oct 14th, , PM 1. Find what control has focus? If I want to display the size of every Form in my Project in the Form's Title what will be the best approach? I don't want to manually put a Load event that adds a handler on the resize event. Suppose I have a label control on a windows form called "UserName".
How can I refer to that label programmatically using the label name? I'm using a ContextMenuStrip for multiple controls and I'm trying to figure out the best way to get the control that was actually clicked on to open the I'm using Visual Studio , VB. Net winforms. As you can guess, I'm kind of new to. NET and just want to reference a control on one form from another. Usually I would just do Form.
0コメント