"Tom Spink" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Michael A. Covington wrote:
>
>> I added Application.EnableVisualStyles() as the first statement in Main()
>> of my program, and didn't notice much change in visual appearance, but
>> what I
>> *did* notice is that some of my buttons stopped working! They were
>> enabled but no longer called their OnClick methods.
>
> Hi Michael,
>
> Without more information, I'm unable to reproduce your bug. However, a
> couple of things to look for is the FlatStyle property of your buttons.
> It
> needs to be set to System in order for them to render in the System's
> visual style. Are you using the Windows Forms Designer? Do the visual
> styles show up there while you are designing your form?
>
> Thanks,
> -- Tom Spink
Thanks for responding. I'm going to check out the FlatStyle property, and
in fact any other property that might distinguish the afflicted buttons from
other ones. Also, the way I create my initial form is rather complicated
(several forms pop up at once when the program starts) and I'm going to
experiment with cutting out all the complexity (even if I lose part of the
program) to see if I can get the problem to go away.
What is really bizarre is that one of the buttons works OK until I put data
into a DataGridView that is on the same form, and then it stops working
properly.
|