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 Controls / February 2006

Tip: Looking for answers? Try searching our database.

unbelievable - accelerator key not working in VB.net?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
chanvb - 28 Feb 2006 11:57 GMT
hi
I am VB6 programmer, working on VB.net now, came across this. To my surprise
this didnt work as it used to work in VB6...
I am making a form with 2 buttons - BONE and BTWO, given its labels as B&ONE
and B&TWO so that I could access (have focus) on that button via keyboard by
pressing an ALT +  corrosponding key - O or T.
Unfortunately it is not working somehow, tried finding answer at many places
but couldnt find, is this a bug in vb.net or am I missing something?
I am using XP Pro with VS.net 2003...
can anyone help?
Kevin Spencer - 28 Feb 2006 13:41 GMT
> Unfortunately it is not working somehow, tried finding answer at many
> places
> but couldnt find, is this a bug in vb.net or am I missing something?

It's not a bug in VB.Net. In fact, it's not a bug at all. It is part of the
.Net Windows Forms object model. I'm not sure why Microsoft decided not to
support this, but I suspect it is due to the way menus are designed to work,
that is, with shortcut keys displayed alongside of the menu text (if
desired).

I do my work in C#, which is why I know it has nothing to do with VB.Net. I
did several hours of research, like yourself, trying to figure out why it
didn't work as it did previously. I believe it can be changed, but it would
require a lot of tweaking to do so. I got the impression that MS wants
developers to follow a more uniform set of design standards, which is why it
would be difficult to change. So, rather than research further, I decided to
"go with the flow" and use the design behavior built into the Framework.

I do wish that Microsoft had taken more trouble to explain this in the
documentation. As both you and I have experienced, a change of this sort can
cause a developer to waste quite a bit of time trying to figure out what
happened, and a little better documentation (read "explanation") would be
extremely helpful. But for whatever reason, they decided not only to change
the behavior, but to hide the information about the whys and wherefores of
this change. In fact, the documentation mentions the fact that you can use
the "&" in a menu text, but doesn't mention why it isn't a helpful or useful
thing to do.

Signature

HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
A brute awe as you,
a Metallic hag entity, eat us.

> hi
> I am VB6 programmer, working on VB.net now, came across this. To my
[quoted text clipped - 10 lines]
> I am using XP Pro with VS.net 2003...
> can anyone help?

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.