Eliminate highlighted button outline

  • Thread starter Thread starter Hal Meyer
  • Start date Start date
H

Hal Meyer

I know this is REALLY picky, but how would one go about preventing that
hideous outline from showing up around a button when it receives focus in VS
2003? I'm known for my eyecandy UI's but this is something that has plagued
me for awhile. Many thanks in advance.
 
You could try handling the button's GotFocus event and explicitly
setting the focus somewhere else, maybe to the next control in the tab
order, or to a hidden button (one under another control, not one whose
Visible is false).

void button1_GotFocus(object sender, EventArgs e)
{
this.SelectNextControl(this.button1, true, true, false, true);
// or
// this.hiddenButton.Focus();
}

==================
Clay Burch
Syncfusion, Inc.
 
Thanks. Actually, I went all-out and created a PrettyButton class derived
from a PictureBox control, with three child PictureBoxes(Left button cap,
Middle stretchy segment, Right button cap) and a label control. It does all
kinds of light-up pretties. But thanks for your suggestion, it probably
would have been a good deal simpler to implement. =/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top