Reputation: 249
I am using Visual Studio 2010
and .NET 3.5
and I am seeing a combobox
display differently in different project. I drop in the combobox
the same way from the toolbox and change the dropdownstyle
to DropDownList
. But depending on the project, the combobox
may look like it is indented (similar look as in DropDown
), with the field highlighted in blue. But in the other project, the combobox
has a more 3D feel. I would love to provide a screenshot but I don't have enough reputation to post images. :-( I am guessing it's probably due to some project settings maybe? Because I create the combobox
the exact same way in both projects - I added a new Form
and drop a combobox
on the form and change the dropdownstyle
to DropDownList
; however, they look differently in the dialog when the project is run. Any help would be appreciated.
Upvotes: 1
Views: 354
Reputation: 249
Solve my own problem. Somehow Application.EnableVisualStyles(); was removed in program.cs. Once I added Application.EnableVisualStyles(); before calling the main form, the comobobox looks the way I wanted
Upvotes: 1