.NET Forum / Windows Forms / WinForm General / August 2006
Focus visualization on XP
|
|
Thread rating:  |
Carlo Folini - 25 Jul 2006 16:53 GMT With vs2005 I created a simple form. New Project->Windows application(c#)->added a button on it-> set FlatStyle="System"
Running this simple program on windows 2003 the button is selected and I see the dotted line around the button. The same program under windows xp pro (italian) selects the button but no dotted line show that the button is selected.
Either w2k3 and xp has the "windows xp style" appearance activated, in fact the visual appearance is the same (rounded buttons).
Any idea on why this different behavior?
 Signature Carlo Folini
Linda Liu [MSFT] - 26 Jul 2006 07:31 GMT Hi Carlo,
Thank you for posting.
In fact, if the button's FlatStyle is set to System, the appearance of the button is determined by the user's operating system.
I have performed a test on Windows 2003. I didn't see the phenomenon you said on Windows 2003 when the button is selected. It's not a dotted line around the button but a thick sold line.
By the way, I couldn't activate the "Windows XP style" on Windows 2003. Right click the desktop and select Properties from the shortcut menu. In the Display Properties window, select Appearance tab. In the Windows and buttons combobox, there's only Windows Classic style option. Could you tell me how you activate the "Windows XP style" on Windows 2003?
I also performed a test on Windows XP. The "Windows XP style" is activated by default. When the program is running on Windows XP, I saw the line around the button is a thick solid line as well.
I look forward to your reply.
Sincerely, Linda Liu Microsoft Online Community Support
================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights.
Carlo Folini - 26 Jul 2006 08:33 GMT Hi Linda, to enable xp style on w2k3 I think you have only to start the "Themes" service (is turned off by default).
Take a look at the image http://aspspider.biz/folini/xpbutton.jpg it shows my winform with the xp button on it with the dotted line.
It's strange that you didn't see the dotted line with xp. Also if you use the tab key on the winform the dotted line didn't show up?
 Signature Carlo Folini
> Hi Carlo, > [quoted text clipped - 42 lines] > > This posting is provided "AS IS" with no warranties, and confers no rights. Carlo Folini - 26 Jul 2006 09:20 GMT Hi Linda, I also tried disabling visual style in windows xp with same behavior. On W2k3 the button is selected and shows the dotted line, in xp the button is selected but no dotted line appears.
 Signature Carlo Folini
> Hi Linda, > to enable xp style on w2k3 I think you have only to start the "Themes" [quoted text clipped - 53 lines] > > > > This posting is provided "AS IS" with no warranties, and confers no rights. Linda Liu [MSFT] - 26 Jul 2006 11:17 GMT Hi Carlo,
Thanks for your quick response and telling me how to activate Windows XP style on Windows 2003.
I performed series tests and the result is that whether on Windows XP or Windows 2003, whether I activate Windows Classic style or Windows XP style, and whether the button's FlatStyle is Sytem or Standard, when I use tab key to select the button, there's a dotted line around it; however, when I click the button, there's no dotted line around it.
Hope this helps.
Sincerely, Linda Liu Microsoft Online Community Support
Carlo Folini - 26 Jul 2006 12:56 GMT Hi Linda, my problem is that, when the winform starts, in w2k3 case there's the dotted line but not in xp. Trying to setFocus on the button didn't change the visulization. It seems that in XP when the focus is given from a SetFocus call there's no visual appearance. Could you investigate this behavior further?
 Signature Carlo Folini
> Hi Carlo, > [quoted text clipped - 12 lines] > Linda Liu > Microsoft Online Community Support Linda Liu [MSFT] - 27 Jul 2006 10:34 GMT Hi Carlo,
Thanks for your response.
In my test on Windows 2003, when the program starts, the button gets focus but there's no dotted line around the button. Only after I press tab key to select the button, the dotted line appears around the button.
Do you mean that you call SetFocus win32 function to get the button focused when the program starts? If so, would you send me the sample code or project for research?
To get my actual emial address, please remove the online from my displayed email address.
I look forward to your reply.
Sincerely, Linda Liu Microsoft Online Community Support
Linda Liu [MSFT] - 31 Jul 2006 12:20 GMT Hi Carlo,
I have run your sample program on both w2k3 and xp. I am sorry to tell you that I didn't see the dotted line around the button when the program starts running on both w2k3 and xp.
Only after I pressed Tab when the program was running, the button showed a dotted line around it.
I think you may have a try running your program on another computer installed w2k3 to see whether you could see the dotted line around the button on that computer.
Sincerely, Linda Liu Microsoft Online Community Support
Carlo Folini - 16 Aug 2006 08:45 GMT The 'problem' was that on the "display properties"->Appearance->Effects button there's the option "Hide underlined letters for keyboard navigation until I press the Alt key" that has also the meaning of handling input focus indicators, as the help correctly states!....
"Specifies whether to suppress the drawing of keyboard shortcuts (the underlined characters in menus and controls) and input focus indicators (the dotted rectangles around objects), until you actually start using the keyboard to navigate in Windows, generally with the ALT, TAB, or arrow keys." Maybe a different option text would save some time to someone (at least in my case!)
 Signature Carlo Folini
> Hi Carlo, > [quoted text clipped - 12 lines] > Linda Liu > Microsoft Online Community Support Linda Liu [MSFT] - 21 Aug 2006 08:53 GMT Hi Carlo,
Sorry for the delayed reply. I am busy with other posts for these days.
I understand your feeling. I also think the statement "Hide underlined letters for keyboard navigation until I press the Alt key" is a little misleading.
If you think it is necessary, you may go to the following link to summit a comment.
https://support.microsoft.com/common/survey.aspx?scid=sw;en;1214&showpage=1& WS=Wish&url=http%3a%2f%2fwww.microsoft.com%2fireland%2fcontact%2f
Thank you for your support for Microsoft again!
Sincerely, Linda Liu Microsoft Online Community Support
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|