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

C#

 
GeneralRe: Windows XP P2P SDK wrapped in .Net Pin
Matthew Hazlett23-Mar-04 14:48
Matthew Hazlett23-Mar-04 14:48 
GeneralRe: Windows XP P2P SDK wrapped in .Net Pin
leppie24-Mar-04 6:17
leppie24-Mar-04 6:17 
GeneralRe: Windows XP P2P SDK wrapped in .Net Pin
schnee2k324-Mar-04 13:07
schnee2k324-Mar-04 13:07 
QuestionHow to change url of running iexplorer instance? Pin
ckl_8823-Mar-04 12:47
ckl_8823-Mar-04 12:47 
AnswerRe: How to change url of running iexplorer instance? Pin
Heath Stewart23-Mar-04 13:01
protectorHeath Stewart23-Mar-04 13:01 
GeneralRe: How to change url of running iexplorer instance? Pin
ckl_8823-Mar-04 13:50
ckl_8823-Mar-04 13:50 
GeneralRe: How to change url of running iexplorer instance? Pin
Heath Stewart23-Mar-04 14:01
protectorHeath Stewart23-Mar-04 14:01 
GeneralStrange problem with ownerdraw listbox Pin
Anders Molin23-Mar-04 12:41
professionalAnders Molin23-Mar-04 12:41 
I have made a control whice inherits from Listbox, and made it ownerdraw...

In the OnDrawItem i have the following code:

base.OnDrawItem(e);
e.DrawBackground();
Graphics g = e.Graphics;
Bitmap b = new Bitmap(30, 30);
Graphics gs = Graphics.FromImage(b);
Brush brush = Brushes.Red;
gs.FillRectangle(brush, 0f, 0f, 30f, 30f);
g.DrawImage(b, e.Bounds.Left + 5, e.Bounds.Top + 5);
Brush myBrush = Brushes.Black;
g.DrawString("hey", e.Font, myBrush,e.Bounds, StringFormat.GenericDefault);


The text is drawed fine, but the bitmaps only blinks and then they are gone. If I scroll the listbox everything is showed fine, but if I minimize and maximize the application (force a redraw) the bitmaps are now drawn.
If I select an item, the bitmap for that item is showed just fine Unsure | :~

Any ideas?

- Anders

Money talks, but all mine ever says is "Goodbye!"

ShotKeeper, my Photo Album / Organizer Application[^]

My Photos[^]


GeneralRe: Strange problem with ownerdraw listbox Pin
Heath Stewart23-Mar-04 13:05
protectorHeath Stewart23-Mar-04 13:05 
GeneralRe: Strange problem with ownerdraw listbox Pin
Anders Molin23-Mar-04 13:22
professionalAnders Molin23-Mar-04 13:22 
GeneralRe: Strange problem with ownerdraw listbox Pin
Heath Stewart23-Mar-04 13:37
protectorHeath Stewart23-Mar-04 13:37 
GeneralRe: Strange problem with ownerdraw listbox Pin
Anders Molin23-Mar-04 13:40
professionalAnders Molin23-Mar-04 13:40 
GeneralRe: Strange problem with ownerdraw listbox Pin
Heath Stewart23-Mar-04 13:48
protectorHeath Stewart23-Mar-04 13:48 
GeneralRe: Strange problem with ownerdraw listbox Pin
Anders Molin23-Mar-04 13:53
professionalAnders Molin23-Mar-04 13:53 
GeneralRe: Strange problem with ownerdraw listbox Pin
Heath Stewart23-Mar-04 13:56
protectorHeath Stewart23-Mar-04 13:56 
GeneralRe: Strange problem with ownerdraw listbox Pin
Anders Molin23-Mar-04 14:00
professionalAnders Molin23-Mar-04 14:00 
GeneralRe: Strange problem with ownerdraw listbox Pin
Anders Molin23-Mar-04 14:16
professionalAnders Molin23-Mar-04 14:16 
GeneralSerialization Pin
Not Active23-Mar-04 10:06
mentorNot Active23-Mar-04 10:06 
GeneralRe: Serialization Pin
Heath Stewart23-Mar-04 10:37
protectorHeath Stewart23-Mar-04 10:37 
GeneralRe: Serialization Pin
Not Active23-Mar-04 10:48
mentorNot Active23-Mar-04 10:48 
GeneralC#->C++ Interface Issue - Passing Data Pin
Chris_Lutz23-Mar-04 7:58
Chris_Lutz23-Mar-04 7:58 
GeneralRe: C#->C++ Interface Issue - Passing Data Pin
Heath Stewart23-Mar-04 9:04
protectorHeath Stewart23-Mar-04 9:04 
GeneralDetect new running process Pin
Apusnaias23-Mar-04 5:53
Apusnaias23-Mar-04 5:53 
GeneralRe: Detect new running process Pin
Dave Kreskowiak23-Mar-04 6:12
mveDave Kreskowiak23-Mar-04 6:12 
GeneralRe: Detect new running process Pin
Heath Stewart23-Mar-04 9:16
protectorHeath Stewart23-Mar-04 9:16 

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.