473,385 Members | 1,872 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,385 software developers and data experts.

Access key in C# application dont work

I have 1 lil problem. I make simple Win Forms app and i put there a tab
control. There i make two pages. In each page i make 1 button. In
tabpage1 button1 and in tabpage2 button2. And i make access key for
both buttons. &button1 and &button2. They have same access key but they
are in diffrent pages. Access key works only in tabpage1 for button1
and access key for second button dont work. BUT! in diffrent comp it
works. Same exec run on mine comp dont work and in another comp it
works. Any1 know whats wrong?
I ll be greatfull for any advices.

Jarek

Apr 14 '06 #1
2 3930
Use the Form's KeyPreview property to allow the Form "1st look" at the key
being pressed. Create an Event Handler for the KeyDownEvent, and have the
Form handle it. If it is the access key for the 2 buttons, use the
PerformClick method of the key that is in the currently-visible tab. Then
set the Handled property of the KeyEventArgs to true to prevent the event
from propogating to the child Controls.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

If the truth hurts, wear it.

<ta*****@tlen.pl> wrote in message
news:11**********************@z34g2000cwc.googlegr oups.com...
I have 1 lil problem. I make simple Win Forms app and i put there a tab
control. There i make two pages. In each page i make 1 button. In
tabpage1 button1 and in tabpage2 button2. And i make access key for
both buttons. &button1 and &button2. They have same access key but they
are in diffrent pages. Access key works only in tabpage1 for button1
and access key for second button dont work. BUT! in diffrent comp it
works. Same exec run on mine comp dont work and in another comp it
works. Any1 know whats wrong?
I ll be greatfull for any advices.

Jarek

Apr 14 '06 #2
it is realy werid solution. Same code - my simple solution works in
other comps, no need to change anything in code. i need solution abt
.... dunno versions, frameworks, whatever but this code works good but
not in mine comp :/

Apr 14 '06 #3

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

Similar topics

63
by: Jerome | last post by:
Hi, I'm a bit confused ... when would I rather write an database application using MS Access and Visual Basic and when (and why) would I rather write it using Visual Studio .Net? Is it as easy...
25
by: cory | last post by:
Hi, I have an Access database and am having an ASP.NEt application written for it. It is almost complete. I have a hosting company that I signed up with a month ago but before I did anything I...
15
by: sparks | last post by:
We get more and more data done in excel and then they want it imported into access. The data is just stupid....values of 1 to 5 we get a lot of 0's ok that alright but 1-jan ? we get colums...
5
by: D | last post by:
Hello All, I am getting ready to send out an MDE file to a customer for evaluation. What I would like to do is put some code on the switchboard load event that says something like....... if...
18
by: surfrat_ | last post by:
Hi, I am having the following problems in getting Microsoft Visual Studio 2005 Professional to link to an Access .mdb database. Please help me to sort this out. Problem 1: The Microsoft...
7
by: mike | last post by:
We have numerous Access 97 apps that we run on our Terminal Server, but two apps in particular is giving us a problem. The problem we are running into is when you select a drop down menu, it errors...
64
by: John | last post by:
Hello there, Im cursing my place of employment...and its taken me a month to realise it... The scenario: Ive just stepped into a role to migrate an access database to VB.Net. The access...
10
by: Les Desser | last post by:
In article <fcebdacd-2bd8-4d07-93a8-8b69d3452f3e@s50g2000hsb.googlegroups.com>, The Frog <Mr.Frog.to.you@googlemail.comMon, 14 Apr 2008 00:45:10 writes Thank you for that. It was very...
24
by: joeldault | last post by:
Question For Microsoft Access Data Base -------------------------------------------------------------------------------- I am Trying to create a single formula that would do the following: If...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.