I created a form and put a button and a label on it. I set the tabstops to
false. When I first run it I can click the button and there is no focus
rectangle. Which is what I want. However, if I press the tab key nothing
initially seems to happen, I know nothing should because I set the tabstop
to false, but to my surprise, when I then click the button again a focus
rectangle appears. This I do not want. Any Ideas on how to stop this
behaviour? Here's some code I tried. I also do not want the focus to stay on
the button during or after I click it which is why I set the focus to the
label. But the rectangles stays. Ugly...
Thanks for the help. John.
namespace WindowsFormsApp lication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeCompo nent();
}
private void button1_Click(o bject sender, EventArgs e)
{
label1.Focus();
}
private void button1_MouseUp (object sender, MouseEventArgs e)
{
label1.Focus();
}
}
}