Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi all,

 

how can I realize the usage of function keys in

my win forms application, so that I can Show

or Hide different panels, which all have different

buttons. But these buttons should all be pressed

by the usage of the function keys.

Greetings,

 

Toni.

Posted

You can add a & in the Text of your control.

And when you do ALT+(A LETTER). This control OnClick(in most case) will be called.

 

N.B.: (A LETTER) is the letter that is right after the &. The letter become the new function key. It support 2 with the same letter but only one will be called.

"If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown

"Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me

"A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend.

C# TO VB TRANSLATOR

Posted
Turn on the forms KeyPreview property and respond to its KeyPressed event. When a function key is pressed you can show the correct panel (and hide the others).

TT

(*_*)

 

There are 10 types of people in this world;

those that understand binary and those that don't.

Posted

Yeah... but try not to make this function over charged. Since it's called everytime a key is pressed... don't make cpu consumming functions in this section.

 

Everything else was said by the... flashing (your picture) TechnoTone

"If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown

"Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me

"A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend.

C# TO VB TRANSLATOR

  • Moderators
Posted
Arch4ngel, I don't think there's a difference between a Ctrl key calling a function or a Button calling the same function, visa vie "don't make cpu consumming functions in this section"
Visit...Bassic Software
Posted

I mean by that :

private void FormKeyPress( object sender, KeyPressEventArgs e )
{
CpuConsummingProcedure();
}

 

Wouldn't be very long if you are typing a text ?

That what I was meaning. But if you can explain me why it shouldn't be cpu consumming... I'll be happy (unless by putting it in a condition).

"If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown

"Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me

"A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend.

C# TO VB TRANSLATOR

Posted

Hehe lolllll

okay let's not start a war about that :D ;)

"If someone say : "Die mortal !"... don't stay to see if he isn't." - Unknown

"Learning to program is like going out with a new girl friend. There's always something that wasn't mentioned in the documentation..." - Me

"A drunk girl is like an animal... it scream at everything like a cat and roll in the grass like a dog." - Me after seeing my girlfriend drunk and some of her drunk friend.

C# TO VB TRANSLATOR

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...