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

Assigning keys

Hi

Is there a way to assign Esc key to an action say closing a form dialog?

Regards
Nov 20 '05 #1
2 1020
"John" <jo**@nospam.infovis.co.uk> schrieb

Is there a way to assign Esc key to an action say closing a form
dialog?


Set the CancelButton property of the Form to the Cancel button. In the
button's click event write "me.close".
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
* "John" <jo**@nospam.infovis.co.uk> scripsit:
Is there a way to assign Esc key to an action say closing a form dialog?


Add a button to the form and assign it to the form's 'CancelButton'
property. Then set the button's 'DialogResult' property or add
'Me.Close' to the button's 'Click' event handler.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

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

Similar topics

1
by: Cory Bosma | last post by:
Looked all over for the answer to this but can't find it. Maybe I'm searching for the wrong thing. I'm new to using classes in PHP. Whenever I try and reference the member's ($line) properties...
10
by: Matthew Sims | last post by:
Python Newbie here. This is my first time learning object-oriented programming and trying to break out of the usual Korn/Perl/PHP style of programming. Having some difficulty understand some items....
10
by: rxl124 | last post by:
I have files that I only need one field that I need to grep it out and I am trying to assign that to another file. (It happens that one field that I am looking for has some other character that...
3
by: . . | last post by:
Hi I am creating new SQL Server Tables using SQL Server 2005. I have set primary key to the tables .But I do not know how to assign Foreign key to the tables .I need to do some joins later and...
4
by: RA | last post by:
Session("ListBoxHold") = document.getElementById("lstCodes") The above statement gives an error "Object Expected" Any Clue?
3
by: gaffar | last post by:
Sir, if we want to assign a primary key to a single cloumn. below code is used. objTable1.Keys.Append("PrimaryKey", KeyTypeEnum.adKeyPrimary, "PrimaryKey_Field") if i want to assign...
5
by: WilliamRLinden | last post by:
Hi world! we are pretty new to JavaScript and have been struggling for now 2 days on this problem ... We would appreciate mercy if anyone can give us some. Basically we are trying to simulate...
16
by: John Salerno | last post by:
Let's say I'm making a game and I have this base class: class Character(object): def __init__(self, name, stats): self.name = name self.strength = stats self.dexterity = stats...
2
by: Adam Sandler | last post by:
Hello, Is it possible to assign a function key to a toolstripbutton? I don't see the property for such an action in the properties for the tsButton. I have a "new" button on the toolstrip. ...
2
by: DavidPr | last post by:
I've downloaded an Open Source Maze game and the keys that makes the thingy move through the maze isn't very intuitive and I'd like to change them to the arrow keys. Here's the current setup: /*...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.