471,347 Members | 1,683 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Disallow focus on form controls

Hello all,

Would like to disallow the ability for controls on my form to get
focus?

Working mainly with a menu system and GDI+ and i would like the user to
use the mouse for most operations. But focus still remains on my first
object (a drop-down box) when i load the form.

Pretty simple request i'd assume.

Thanks in advance,

Brian

Dec 29 '05 #1
1 1606
Have you tried simply responding to the Leave event of the dropdown and
refocusing that control?

This works fine except that if you use TextBox or other controls that
require key input they never get the focus.

private void comboBox1_Leave(object sender, System.EventArgs e)

{

this.comboBox1.Focus();

}
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

<br************@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hello all,

Would like to disallow the ability for controls on my form to get
focus?

Working mainly with a menu system and GDI+ and i would like the user to
use the mouse for most operations. But focus still remains on my first
object (a drop-down box) when i load the form.

Pretty simple request i'd assume.

Thanks in advance,

Brian

Dec 30 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jason | last post: by
2 posts views Thread by chris | last post: by
8 posts views Thread by copyco | last post: by
2 posts views Thread by Sid Price | last post: by
7 posts views Thread by Pygmalion | last post: by
6 posts views Thread by =?Utf-8?B?U2NvdHQgTGFt?= | last post: by
1 post views Thread by Wan | last post: by
3 posts views Thread by Simon Tamman | last post: by
reply views Thread by Ronak mishra | 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.