473,320 Members | 1,695 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 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 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 2139

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

Similar topics

0
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...
1
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...
5
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...
5
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...
0
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...
5
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...
5
by: Sharon | last post by:
Hi all, How can i set focus to a label control. lc.Focus() doesn't work. Thanks, Sharon.
2
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...
3
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.