Click here to Skip to main content
15,922,894 members
Home / Discussions / C#
   

C#

 
GeneralRe: Database independent access: Mimer Vs DAC Pin
Daniel Turini20-Nov-04 6:35
Daniel Turini20-Nov-04 6:35 
GeneralRe: Database independent access: Mimer Vs DAC Pin
devvvy20-Nov-04 13:28
devvvy20-Nov-04 13:28 
GeneralComboBox Pin
Dany Ramos20-Nov-04 3:39
Dany Ramos20-Nov-04 3:39 
GeneralRe: ComboBox Pin
Luis Alonso Ramos20-Nov-04 21:34
Luis Alonso Ramos20-Nov-04 21:34 
GeneralRe: ComboBox Pin
Dany Ramos22-Nov-04 1:05
Dany Ramos22-Nov-04 1:05 
GeneralRe: ComboBox Pin
Luis Alonso Ramos22-Nov-04 5:31
Luis Alonso Ramos22-Nov-04 5:31 
GeneralRe: ComboBox Pin
Dany Ramos23-Nov-04 0:34
Dany Ramos23-Nov-04 0:34 
GeneralRe: ComboBox Pin
Luis Alonso Ramos23-Nov-04 5:24
Luis Alonso Ramos23-Nov-04 5:24 
Dany Ramos wrote:
I see a C++ project which it is possible to introduce a separator.

It can be done in C# too. But you need to subclass the control. That article you mention syas how he did it, by subclassing the control and using WM_CTLCOLOR message to paint the separator; that is to avoid the use of an ownerdrawn combobox, which is a much more work for something so simple.

Alternatively you could try writing an ownerdrawn control. I've never done this myself so I can't offer much help. But for a start, see the documentation for the DrawMode property and DrawItem event of the ComboBox control.

It'd go something like this: set the DrawMode to OwnerDrawFixed when you create the item. Insert your separators as a regular item with " " as text. When you get the DrawItem event for your separator, draw a single line in the middle of the rectangle. When you get that event for a regular item, check its State to see if it's selected or not, and paint it accordingly.

Dany Ramos wrote:
Do you know how to convert a c++ project in c#?

It's not possible to convert a C++ projecto into C# automatically (at least not in the general case.) But you can see how it's done in C++ and reimplement it in C#.

I hope this helps,

-- LuisR



Luis Alonso Ramos
Intelectix - Chihuahua, Mexico

Not much here: My CP Blog!

GeneralCleaning up eventhandlers Pin
Skynyrd20-Nov-04 0:28
Skynyrd20-Nov-04 0:28 
GeneralScrolling the window scrollbar does not show the whole graphic Pin
Sylvia219-Nov-04 23:39
Sylvia219-Nov-04 23:39 
GeneralRe: Scrolling the window scrollbar does not show the whole graphic Pin
Sebastian Schneider21-Nov-04 23:33
Sebastian Schneider21-Nov-04 23:33 
GeneralResizing SystemsIcons Pin
DJmistral19-Nov-04 23:04
DJmistral19-Nov-04 23:04 
Generalproblem about invoke OS format command in C# Pin
momer19-Nov-04 22:57
momer19-Nov-04 22:57 
Questionhow to find image co-ordinate Pin
hteen2419-Nov-04 20:09
hteen2419-Nov-04 20:09 
AnswerRe: how to find image co-ordinate Pin
sreejith ss nair20-Nov-04 18:23
sreejith ss nair20-Nov-04 18:23 
Generalcomparing C# / .NET exe files Pin
Ray Gregory19-Nov-04 18:00
Ray Gregory19-Nov-04 18:00 
GeneralRe: comparing C# / .NET exe files Pin
Daniel Turini19-Nov-04 20:48
Daniel Turini19-Nov-04 20:48 
GeneralRe: comparing C# / .NET exe files Pin
bouli19-Nov-04 21:53
bouli19-Nov-04 21:53 
GeneralRe: comparing C# / .NET exe files Pin
Jörgen Sigvardsson20-Nov-04 14:05
Jörgen Sigvardsson20-Nov-04 14:05 
GeneralRe: comparing C# / .NET exe files Pin
bouli20-Nov-04 23:49
bouli20-Nov-04 23:49 
GeneralRe: comparing C# / .NET exe files Pin
Jörgen Sigvardsson21-Nov-04 0:34
Jörgen Sigvardsson21-Nov-04 0:34 
GeneralRe: comparing C# / .NET exe files Pin
Dennis C. Dietrich19-Nov-04 22:30
Dennis C. Dietrich19-Nov-04 22:30 
GeneralRe: comparing C# / .NET exe files Pin
Glenn Lewis15-Feb-05 20:00
Glenn Lewis15-Feb-05 20:00 
GeneralOperator Over Loading Pin
Sendilkumar.M19-Nov-04 17:58
Sendilkumar.M19-Nov-04 17:58 
GeneralRe: Operator Over Loading Pin
Daniel Turini19-Nov-04 20:45
Daniel Turini19-Nov-04 20:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.