TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Erdinc Kolukisa
NA
113
0
Keypress or Keydown Event in mdiForm
Nov 23 2010 3:59 AM
hey coders...i create some children forms in my main form..it is ok till here..my problem is that i cant catch which button is pressed when the second form is opened..in first child form it works well but not in second or in another child forms..i set True my Form2's KeyPreview property...by the way i open my mdiChild forms as tabpaged..
here my codes
private
void
Form2_KeyDown(
object
sender,
KeyEventArgs
e)
{
if
(e.KeyCode ==
Keys
.W)
MessageBox
.Show(
"W tusuna basildi"
);
}
and i wrote it in KeyPress even too
private
void
Form2_KeyPress(
object
sender,
KeyPressEventArgs
e)
{
if
(e.KeyChar ==
'k'
)
MessageBox
.Show(
"Tusa basildi"
);
}
so what can i do else or where is my mistake ?
Reply
Answers (
1
)
C#, threading and GUI help needed
Saving Form Location to DB?