Click here to Skip to main content
15,895,485 members
Home / Discussions / C#
   

C#

 
GeneralRe: Creating a database manager Pin
Heath Stewart23-Apr-04 15:56
protectorHeath Stewart23-Apr-04 15:56 
GeneralPassing a Class instance to a method... Pin
hammackj23-Apr-04 10:38
hammackj23-Apr-04 10:38 
GeneralRe: Passing a Class instance to a method... Pin
Heath Stewart23-Apr-04 10:41
protectorHeath Stewart23-Apr-04 10:41 
GeneralRe: Passing a Class instance to a method... Pin
hammackj23-Apr-04 10:51
hammackj23-Apr-04 10:51 
GeneralRe: Passing a Class instance to a method... Pin
Werdna23-Apr-04 16:32
Werdna23-Apr-04 16:32 
GeneralRe: Passing a Class instance to a method... Pin
Heath Stewart24-Apr-04 8:14
protectorHeath Stewart24-Apr-04 8:14 
GeneralDrawString strange problem Pin
_Comet_Keeper_23-Apr-04 10:20
_Comet_Keeper_23-Apr-04 10:20 
GeneralRe: DrawString strange problem Pin
Heath Stewart23-Apr-04 10:45
protectorHeath Stewart23-Apr-04 10:45 
The DrawItemEventArgs contains the properties you need to draw the items, but you must use its State property to determine the state of items, like whether or not it is selected. Keep in mind that since the DrawItemEventArgs.State property uses a flag enumeration, you must use bitwise operators to determine state. For instance, to find out if the item is selected, use something like the following:
bool selected = (e.State & DrawItemState.Selected) != 0;
if (selected)
{
  // Draw selected
}
else
{
 // Draw unselected
}
See Resizable ListBox[^] for a pretty good example (there's many others, too - I just still had that URL in my clipboard used for another reply just a minute ago).

 

Microsoft MVP, Visual C#
My Articles
QuestionHow can I do Word Wrap in ListBox Items Pin
BinalShah23-Apr-04 10:12
BinalShah23-Apr-04 10:12 
AnswerRe: How can I do Word Wrap in ListBox Items Pin
Heath Stewart23-Apr-04 10:38
protectorHeath Stewart23-Apr-04 10:38 
QuestionHow to cut video to images by C# Pin
MDM_RVS23-Apr-04 8:25
MDM_RVS23-Apr-04 8:25 
AnswerRe: How to cut video to images by C# Pin
Heath Stewart23-Apr-04 10:34
protectorHeath Stewart23-Apr-04 10:34 
QuestionHow to display the next Record's autonumber in the form? Pin
Anonymous23-Apr-04 8:07
Anonymous23-Apr-04 8:07 
AnswerRe: How to display the next Record's autonumber in the form? Pin
Heath Stewart23-Apr-04 10:31
protectorHeath Stewart23-Apr-04 10:31 
GeneralRe: How to display the next Record's autonumber in the form? Pin
Anonymous23-Apr-04 23:50
Anonymous23-Apr-04 23:50 
GeneralRe: How to display the next Record's autonumber in the form? Pin
Heath Stewart24-Apr-04 8:12
protectorHeath Stewart24-Apr-04 8:12 
GeneralRe: How to display the next Record's autonumber in the form? Pin
Anonymous25-Apr-04 2:07
Anonymous25-Apr-04 2:07 
GeneralRegenerate Print Preview Pin
hxxbin23-Apr-04 8:03
hxxbin23-Apr-04 8:03 
GeneralRe: Regenerate Print Preview Pin
Heath Stewart23-Apr-04 10:29
protectorHeath Stewart23-Apr-04 10:29 
GeneralRe: Regenerate Print Preview Pin
hxxbin26-Apr-04 4:14
hxxbin26-Apr-04 4:14 
GeneralMultiple childs of MDI form Pin
turist6923-Apr-04 7:03
turist6923-Apr-04 7:03 
GeneralRe: Multiple childs of MDI form Pin
Heath Stewart23-Apr-04 7:21
protectorHeath Stewart23-Apr-04 7:21 
GeneralRe: Multiple childs of MDI form Pin
turist6923-Apr-04 8:00
turist6923-Apr-04 8:00 
GeneralAppDomain.DomainUnload never fired automatically Pin
VizOne23-Apr-04 6:16
VizOne23-Apr-04 6:16 
GeneralRe: AppDomain.DomainUnload never fired automatically Pin
leppie23-Apr-04 7:00
leppie23-Apr-04 7:00 

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.