473,837 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Link Label Focus Issue

I have an issue in which a link label on a windows form does not draw the
focus rectangle if you programmaticall y force it to have focus via the
Control.Focus() method.

To duplicate, create a new windows app, place a button and a link label on
the form. In the button click event, place the following code,
this.linkLabel1 .Focus(). Run the app and press tab between the two controls
and you notice that the link label has the focus rectangle, but if you put
focus on the button and click the button, the focus rectangle is not drawn
on the link label even though it has focus.

I've tried several methods to force the drawing of the rectangle, including
the WM_SETFOCUS and VK_TAB api's without luck.

Any ideas on how to force the drawing of the focus rectangle? (I'm trying
to avoid using the drawrect myself).

Thanks in Advance!

Steve Bezner

Nov 15 '05 #1
0 2170

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Steve Bezner | last post by:
I have an issue in which a link label on a windows form does not draw the focus rectangle if you programmatically force it to have focus via the Control.Focus() method. To duplicate, create a new windows app, place a button and a link label on the form. In the button click event, place the following code, this.linkLabel1.Focus(). Run the app and press tab between the two controls and you notice that the link label has the focus...
by: PK9 | last post by:
On my page, I want to set the focus to the top of the page (where I have a message in a label) after a button is clicked. How can I use javascript on the server side to set the focus either to a label OR a hidden input field? I do not have any textboxes on the page. The reason I need this is because I have a datagrid with potentially a LOT of records in it. The user can change these records, and click a Save button at the bottom of my...
by: Brian Foley | last post by:
Hello, I am used to using the label tag with check boxes and radio buttons in html forms. This allows me to click on the text of the label to activate/deactivate the check box / button, rather than having to click on the (possibly small) box or button. I recently tried to assign a label to a select "drop down list", but found that when I clicked on the label text to bring it into focus, the select box was reset to the first entry. ...
by: WindAndWaves | last post by:
Hi Gurus I have a very simple question this time. I have a continuous form with a textbox (ID number) and a label. The label has a on_click event: msgbox me.id.value If I click on the label then I get a message : 1 Now, Imagine I have the cursor on ID = 1 (the first record), then I scroll
by: Morten Wennevik | last post by:
When the linklabel link gets focus, there is a dotted bounding box surrounding the link text until something else receives focus. Is it possible to remove this box? -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
by: Rich Blackburn | last post by:
I am trying to create a hypertext link (text within an anchor) so that if the onlly thing the user does is to press Enter, the link will take affect and navigate properly. The link is not the first "object" on the page. Tabbing to the hypertext certainly works. Any ideas? Rich Blackburn
by: Sharon | last post by:
Hi all, How can i set focus to a label control. lc.Focus() doesn't work. Thanks, Sharon.
by: Greg (codepug | last post by:
I have created a LABEL, and placed it on top of a button. When I press the button, the label disappears under the button. Is there a way to get the LABEL to stay on top of the button, or reappear after the button is clicked ? I need the Label to remain an object seperate from the button. Greg
by: muddasirmunir | last post by:
I am using the following code at mouse move event of label Now i want that when user lost focus from the label its color aging change back , on what event i want to do this code as there is no event like lost focus on label. OR how i can detect that the user moves its cursor outside label.
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.