Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Combobox with borderstyle fixedsingle

Hi,

I am customizing the look of my forms and I think that the textboxes in the form look much better when the borderstyle is fixedsingle.
When I wanted to give the combobox the borderstyle the fixedsingle value I saw that their wasn't a borderstyle property.

I wonder if their is any way that I can use a combobox with fixedsingle borderstyle?
[371 byte] By [theWizard] at [2007-11-11 7:20:03]
# 1 Re: Combobox with borderstyle fixedsingle
You can use a third-party combobox, such as this one:
http://www.vbaccelerator.com/home/VB/Code/Controls/Combo_and_List_Boxes/Office_Style_Combo_Boxes/article.asp

Or, if your users are running Windows XP, you can allow your program to use XP's visual styles:
http://www.vbaccelerator.com/home/VB/Code/Libraries/XP_Visual_Styles/Using_XP_Visual_Styles_in_VB/article.asp
Phil Weber at 2007-11-11 17:27:06 >
# 2 Re: Combobox with borderstyle fixedsingle
Thanks for the information. The only problem is that the codes are for VB6 and I'm using VS.NET. Are their also similar methodes for VB.NET?
theWizard at 2007-11-11 17:28:06 >
# 3 Re: Combobox with borderstyle fixedsingle
Sorry, most users of FreeVBCode are using VB6. In the future, you may wish to post VB.NET questions to the .NET Technical forum at dev-archive: http://forums.dev-archive.com/forumdisplay.php?f=120

The second method above (using a .manifest file) also works for VB.NET. Or, you may simply call Application.EnableVisualStyles from your form's startup code (before any controls are created on the form).

If your users are not using Windows XP, you'll need to use a third-party control or make the combobox owner-drawn and draw the border yourself. Here's a .NET version of vbAccelerator's flat combobox: http://www.vbaccelerator.com/home/NET/Code/Controls/ListBox_and_ComboBox/Flat_Style_Combo_Boxes/article.asp
Phil Weber at 2007-11-11 17:29:04 >