Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / June 2007

Tip: Looking for answers? Try searching our database.

Control hotkey on inherited form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jack Jackson - 29 Jun 2007 20:15 GMT
VB2005.  I built a class inherited from Windows.Forms.Form and placed
a Button on the form.  The button.Text contains "&Quit".

I create another class that inherits from the first class.  In the IDE
designer I see the button and its caption is Quit with the Q
underlined, as I expect.

When I run the second class, the button displays with a caption of
Quit with no underline.  However the hotkey does work - Alt-Q does
cause the button to click.

Why is the caption not shown with the underline?
AlexS - 29 Jun 2007 21:36 GMT
Depends on version of Windows you run and settings. Press Alt and see if
underscore appears

> VB2005.  I built a class inherited from Windows.Forms.Form and placed
> a Button on the form.  The button.Text contains "&Quit".
[quoted text clipped - 8 lines]
>
> Why is the caption not shown with the underline?
Jack Jackson - 30 Jun 2007 05:52 GMT
Thanks, that was it.  This is a new machine that I just started using
a couple of days ago.  I was not aware there was such a setting in
Windows, apparently all of the previous machines I have used had the
option set to always show the underscore.

>Depends on version of Windows you run and settings. Press Alt and see if
>underscore appears
[quoted text clipped - 11 lines]
>>
>> Why is the caption not shown with the underline?
Jeff Johnson - 29 Jun 2007 21:54 GMT
> VB2005.  I built a class inherited from Windows.Forms.Form and placed
> a Button on the form.  The button.Text contains "&Quit".
[quoted text clipped - 8 lines]
>
> Why is the caption not shown with the underline?

When you run the second class on YOUR machine? Or someone else's? Have you
by any chance looked to see if ANY other application running on that machine
happens to display the accelerators by default? If not, then this is a
system-wide setting that you can control via the Display applet.

Rate this thread:







Free Magazines

Get 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 ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.