473,324 Members | 2,254 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,324 software developers and data experts.

Adding a mnemonic to a C# Button

hi,

I'm building a GUI in C# and I want the buttons to have a mnemonic character
attached to the button. I cannot seem to do this in C#, where it was very
simple to do in Visual C++.

Thanks,
donal
Nov 16 '05 #1
3 7464
Hi,

Use char &

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"Donal Kelly" <so*****@ms.com> je napisal v sporočilo
news:Oy**************@TK2MSFTNGP09.phx.gbl ...
hi,

I'm building a GUI in C# and I want the buttons to have a mnemonic
character attached to the button. I cannot seem to do this in C#, where
it was very simple to do in Visual C++.

Thanks,
donal

Nov 16 '05 #2
More precisely, use the & char before the character you want the accelerator
for. For example:

&Load will underlne the "L" and "L" will be your accelerator (or mnemonic,
whatever word you want to use).

Or E&xit would make "x" your accelerator.

Pete

"Peter Jausovec" <pe***@jausovec.net> wrote in message
news:OM*************@TK2MSFTNGP15.phx.gbl...
Hi,

Use char &

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"Donal Kelly" <so*****@ms.com> je napisal v sporočilo
news:Oy**************@TK2MSFTNGP09.phx.gbl ...
hi,

I'm building a GUI in C# and I want the buttons to have a mnemonic
character attached to the button. I cannot seem to do this in C#, where
it was very simple to do in Visual C++.

Thanks,
donal


Nov 16 '05 #3
thanks pete, works great.

donal
"Donal Kelly" <so*****@ms.com> wrote in message
news:Oy**************@TK2MSFTNGP09.phx.gbl...
hi,

I'm building a GUI in C# and I want the buttons to have a mnemonic
character attached to the button. I cannot seem to do this in C#, where
it was very simple to do in Visual C++.

Thanks,
donal

Nov 16 '05 #4

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

Similar topics

5
by: Madeleine | last post by:
Hi I took over management of an established website that I discovered was written in php and javascript (I am only familiar with html). I needed to add in a new button so I looked at the code,...
1
by: dave | last post by:
I am designing an application that allows the user to view information from a database, loaded onto a form via a datagrid. The user would click on a 'view' button and the information from the...
2
by: Abhi | last post by:
How can i add a Help button (button with ? mark on it) on the title bar of an application in C#.
4
by: Chris | last post by:
I think I must be going crazy. All I want to do is add a button to the bottom of a datagrid which will later run some code for a web based project. I've created a custom control that inherits from...
0
by: anoop | last post by:
how can I call javascript function by adding button's attribute such as onclick in the code behind file as ".aspx.vb" I have written code as Draw_line.Attributes("Onclick")="javascript: where...
1
by: seanmayhew | last post by:
I have a form page that that while editing saves the data to an xml doc before submitting to db. On each page unload it saves the xmldoc as the user can add multiple items to the company like...
1
by: Mike P | last post by:
what is the syntax for adding a rollover button as an image button? I have saved the button as a .swf file and put it as the ImageUrl, but since it isn't an image, do I need to save it as an image...
2
by: Microsoft Newsgroups | last post by:
Hi All, I'm looking for some simple examples of using the CodeDom. While the ones that I have found have been very helpful, I can't seem to find the following: How to add a control to a...
3
by: Kannan | last post by:
Hi, I am trying to created Outloook Add-in Com in outlook using C#. I have seen this URL for developing this sample http://support.microsoft.com/?kbid=302901 When I executed this program it...
0
by: bobjones122 | last post by:
I want to customize the way a Comment (under the review tab) appears. I want to add buttons to a comment so that every time a comment appears, a button appears that will run another application if it...
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
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...
1
by: Shćllîpôpď 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.