471,310 Members | 985 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 software developers and data experts.

Handling Key Messages in MDI

I have an MDI application where I need to draw a line using Left/Right arrow
keys. It works fine if it has just one child, but with more than one it
switches between children. I've tried the following function, but I'm not
getting any hits on it. (Using Studio 2005 Beta)

protected override void WndProc(ref Message m)


if (m.Msg == WM_KEYDOWN)


Keys keyCode = (Keys)m.WParam & Keys.KeyCode;

switch (keyCode)


case Keys.Left:

Console.WriteLine("Left Key");


case Keys.Right:

Console.WriteLine("Right Key");




base.WndProc(ref m);



Feb 13 '06 #1
0 948

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by John Doe | last post: by
9 posts views Thread by Hans-Joachim Widmaier | last post: by
6 posts views Thread by Daniel Wilson | last post: by
7 posts views Thread by Ekim | last post: by
2 posts views Thread by Alvaro G Vicario | last post: by
1 post views Thread by Do | last post: by
5 posts views Thread by Jurgen Defurne | last post: by
4 posts views Thread by John Wright | last post: by
16 posts views Thread by john6630 | last post: by
reply views Thread by rosydwin | last post: by

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.