PC Review


Reply
Thread Tools Rate Thread

Combobox borderstyle or flatstyle

 
 
ORC
Guest
Posts: n/a
 
      11th Jan 2005
With buttons and textboxes etc. it is possible to set the orderstyle or
flatstyle but what about comboboxes? - is it possible to make them more up
to date?

Thanks,
Ole


 
Reply With Quote
 
 
 
 
Carlos J. Quintero [.NET MVP]
Guest
Posts: n/a
 
      11th Jan 2005
Not in VS.NET 2003. It will be possible in VS 2005 (Whidbey):

http://www.fawcette.com/vsm/2004_01/...tures/dollard/

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com


"ORC" <(E-Mail Removed)> escribió en el mensaje
news:%23a9smZ%(E-Mail Removed)...
> With buttons and textboxes etc. it is possible to set the orderstyle or
> flatstyle but what about comboboxes? - is it possible to make them more up
> to date?
>
> Thanks,
> Ole
>
>



 
Reply With Quote
 
Peter Wone
Guest
Posts: n/a
 
      11th Jan 2005
Or you could call Application.EnableVisualStyles() in main() and you'll find
that you get the new XP styling on your comboboxes, which is sort of flat
with a sexed up button.

If you use visual styles remember to pump the message queue after you call
Application.EnableVisualStyles() and before you create any objects that
cache imagelists, or you'll get freaky COM errors at unexpected times.

In fact just make it policy to always code like this

void main() {
....
Application.EnableVisualStyles();
Application.DoEvents();
....
}

and it will save you untold grief. Frankly I'd like to box the ears of
whoever failed to make the EnableVisualStyles() method pump the message
queue itself. It's always safe to do and sometimes crucial. You'd be amazed
how many widgets use imagelists internally.

To get the styles to apply to text boxes and for that matter anything that
has a FlatStyle property, set the FlatStyle to System. Anything that lacks a
FlatStyle property, you just have to pray. With comboboxes you're in luck.


 
Reply With Quote
 
ORC
Guest
Posts: n/a
 
      12th Jan 2005
Thanks! looks great. Just ensure that I understand ir correctly: is DoEvents
enough to pump the message que? Nothing else but the 2 lines are necessary?

Thanks,
Ole


"Peter Wone" <(E-Mail Removed)> wrote in message
news:%23Avs8F$(E-Mail Removed)...
> Or you could call Application.EnableVisualStyles() in main() and you'll

find
> that you get the new XP styling on your comboboxes, which is sort of flat
> with a sexed up button.
>
> If you use visual styles remember to pump the message queue after you call
> Application.EnableVisualStyles() and before you create any objects that
> cache imagelists, or you'll get freaky COM errors at unexpected times.
>
> In fact just make it policy to always code like this
>
> void main() {
> ...
> Application.EnableVisualStyles();
> Application.DoEvents();
> ...
> }
>
> and it will save you untold grief. Frankly I'd like to box the ears of
> whoever failed to make the EnableVisualStyles() method pump the message
> queue itself. It's always safe to do and sometimes crucial. You'd be

amazed
> how many widgets use imagelists internally.
>
> To get the styles to apply to text boxes and for that matter anything that
> has a FlatStyle property, set the FlatStyle to System. Anything that lacks

a
> FlatStyle property, you just have to pray. With comboboxes you're in luck.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Button FlatStyle params in .NET 1.1 Janiek Buysrogge Microsoft C# .NET 1 19th Jan 2006 03:45 PM
Set FlatStyle to System yxq Microsoft VB .NET 2 15th Nov 2004 10:36 PM
3-D FlatStyle is too flat! Jeff Microsoft Dot NET Framework Forms 7 4th Oct 2004 04:33 AM
Help with FlatStyle.System and font Alan W. Microsoft Dot NET Framework Forms 2 2nd Jun 2004 11:49 PM
Label FlatStyle.Popup Antonio Barros Microsoft C# .NET 1 29th Dec 2003 01:44 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:41 AM.