Click here to Skip to main content
15,908,166 members
Home / Discussions / C#
   

C#

 
AnswerRe: what is the equivalent to this c++ code in C#? Pin
iscript21-Jul-09 15:56
iscript21-Jul-09 15:56 
QuestionIs it possible to disable parts of a pictureBox? Pin
NewJavaBean20-Jul-09 11:23
NewJavaBean20-Jul-09 11:23 
AnswerRe: Is it possible to disable parts of a pictureBox? Pin
Christian Graus20-Jul-09 14:30
protectorChristian Graus20-Jul-09 14:30 
GeneralRe: Is it possible to disable parts of a pictureBox? Pin
NewJavaBean20-Jul-09 15:30
NewJavaBean20-Jul-09 15:30 
AnswerRe: Is it possible to disable parts of a pictureBox? Pin
PIEBALDconsult20-Jul-09 17:18
mvePIEBALDconsult20-Jul-09 17:18 
GeneralRe: Is it possible to disable parts of a pictureBox? Pin
NewJavaBean21-Jul-09 2:16
NewJavaBean21-Jul-09 2:16 
GeneralRe: Is it possible to disable parts of a pictureBox? Pin
NewJavaBean21-Jul-09 6:03
NewJavaBean21-Jul-09 6:03 
QuestionIntermitant Error in Outlook 2007 Plugin using VSTO 3.0 Pin
Wendelldh20-Jul-09 9:33
Wendelldh20-Jul-09 9:33 
QuestionProblem with populating data from one grid into other Pin
rocky81120-Jul-09 7:51
rocky81120-Jul-09 7:51 
QuestionRepeating Images Pin
eddieangel20-Jul-09 6:57
eddieangel20-Jul-09 6:57 
AnswerRe: Repeating Images Pin
Luc Pattyn20-Jul-09 8:29
sitebuilderLuc Pattyn20-Jul-09 8:29 
QuestionAdd text to listbox with different color Pin
tamir90120-Jul-09 6:40
tamir90120-Jul-09 6:40 
AnswerRe: Add text to listbox with different color Pin
musefan20-Jul-09 6:49
musefan20-Jul-09 6:49 
GeneralRe: Add text to listbox with different color Pin
tamir90120-Jul-09 6:53
tamir90120-Jul-09 6:53 
AnswerRe: Add text to listbox with different color Pin
Luc Pattyn20-Jul-09 6:55
sitebuilderLuc Pattyn20-Jul-09 6:55 
AnswerRe: Add text to listbox with different color Pin
PIEBALDconsult20-Jul-09 7:01
mvePIEBALDconsult20-Jul-09 7:01 
GeneralRe: Add text to listbox with different color Pin
tamir90120-Jul-09 7:23
tamir90120-Jul-09 7:23 
GeneralRe: Add text to listbox with different color Pin
Luc Pattyn20-Jul-09 7:47
sitebuilderLuc Pattyn20-Jul-09 7:47 
GeneralRe: Add text to listbox with different color Pin
tamir90120-Jul-09 8:03
tamir90120-Jul-09 8:03 
GeneralRe: Add text to listbox with different color Pin
Luc Pattyn20-Jul-09 8:10
sitebuilderLuc Pattyn20-Jul-09 8:10 
Hi,

you don't have to worry about the firing of the DrawItem event, it basically works like the Paint event of any Control, i.e. it gets fired by Windows when (part of) the Control needs being redrawn because something happened (a Window on top of it has been removed, the user caused a scroll, whatever) OR your program told the Control something has changed (by calling Refresh or Invalidate).

So make sure the content of your Control is what you want it to be, e.g. on a button click, add an item to the ListBox.Items collection. And if something changes without the control knowing it, tell it to redraw with Invalidate().

Did you look at my example at all?

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.

GeneralRe: Add text to listbox with different color Pin
tamir90120-Jul-09 18:32
tamir90120-Jul-09 18:32 
GeneralRe: Add text to listbox with different color Pin
Luc Pattyn21-Jul-09 1:30
sitebuilderLuc Pattyn21-Jul-09 1:30 
Questionhard disk serail number Pin
mokhtar2820-Jul-09 6:21
mokhtar2820-Jul-09 6:21 
AnswerRe: hard disk serail number Pin
Eddy Vluggen20-Jul-09 6:28
professionalEddy Vluggen20-Jul-09 6:28 
GeneralRe: hard disk serail number Pin
Luc Pattyn20-Jul-09 6:57
sitebuilderLuc Pattyn20-Jul-09 6:57 

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.