Click here to Skip to main content
15,919,931 members
Home / Discussions / C#
   

C#

 
AnswerRe: How can you detect if User IS ONLINE? Pin
John Mautari11-Feb-03 5:08
John Mautari11-Feb-03 5:08 
QuestionHow to autoredraw if I use "graphics" Pin
clarkwuzhe5-Feb-03 17:30
clarkwuzhe5-Feb-03 17:30 
AnswerRe: How to autoredraw if I use "graphics" Pin
Paresh Gheewala5-Feb-03 18:08
Paresh Gheewala5-Feb-03 18:08 
AnswerRe: How to autoredraw if I use "graphics" Pin
Jeff J5-Feb-03 21:56
Jeff J5-Feb-03 21:56 
GeneralRe: How to autoredraw if I use "graphics" Pin
clarkwuzhe6-Feb-03 6:23
clarkwuzhe6-Feb-03 6:23 
GeneralRe: How to autoredraw if I use "graphics" Pin
Jeff J6-Feb-03 9:52
Jeff J6-Feb-03 9:52 
GeneralRe: How to autoredraw if I use "graphics" Pin
clarkwuzhe7-Feb-03 7:08
clarkwuzhe7-Feb-03 7:08 
GeneralRe: How to autoredraw if I use "graphics" Pin
Jeff J7-Feb-03 7:58
Jeff J7-Feb-03 7:58 
clarkwuzhe wrote:
what if I draw something else.
Shall I always preserve what i draw in a bmp and repaint the bmp when needed?


That depends on what you ultimately want to do. If there are only a small number of formats which your app might draw, then you could keep a variable around for each type, and yet another one that tells your Paint handler which one to render. That would be useful if you need to save (or otherwise preserve) that exact graphics format. However, that doesn't seem likely based on your original question.

Otherwise, it might be easier, as you mentioned, to convert each type to a Bitmap (which is probably the most universal and flexible type to use with GDI+), and always draw whatever's in mybmp. Behind the scenes, GDI+ will always convert an image to bitmap format (if necessary) for the actual rendering anyway.

Like I posted earlier, I do not know why you are bypassing PictureBox's Image property, which will handle the Paint requests automatically. As it stands, you could use a Label (or most any other control) and draw using its Graphics object too. PictureBox already contains methods for fairly custom image drawing, which you do not need if you are custom drawing yourself. Just letting you know; I don't mean to confuse you.

Cheers
GeneralGetting Started in Software Dev. Pin
jtmtv185-Feb-03 14:40
jtmtv185-Feb-03 14:40 
GeneralRe: Getting Started in Software Dev. Pin
Taka Muraoka5-Feb-03 15:12
Taka Muraoka5-Feb-03 15:12 
GeneralRe: Getting Started in Software Dev. Pin
jtmtv185-Feb-03 15:24
jtmtv185-Feb-03 15:24 
GeneralRe: Getting Started in Software Dev. Pin
Taka Muraoka5-Feb-03 15:35
Taka Muraoka5-Feb-03 15:35 
GeneralRe: Getting Started in Software Dev. Pin
jtmtv185-Feb-03 15:47
jtmtv185-Feb-03 15:47 
GeneralRe: Getting Started in Software Dev. Pin
Taka Muraoka5-Feb-03 15:51
Taka Muraoka5-Feb-03 15:51 
Questionhow to get all the files names in one folder? Pin
clarkwuzhe5-Feb-03 11:59
clarkwuzhe5-Feb-03 11:59 
AnswerRe: how to get all the files names in one folder? Pin
Paresh Gheewala5-Feb-03 12:30
Paresh Gheewala5-Feb-03 12:30 
AnswerRe: how to get all the files names in one folder? Pin
Paresh Gheewala5-Feb-03 13:13
Paresh Gheewala5-Feb-03 13:13 
QuestionHow to tell whether a string is a number? Pin
clarkwuzhe5-Feb-03 11:30
clarkwuzhe5-Feb-03 11:30 
AnswerRe: How to tell whether a string is a number? Pin
Paresh Gheewala5-Feb-03 11:37
Paresh Gheewala5-Feb-03 11:37 
GeneralRe: How to tell whether a string is a number? Pin
clarkwuzhe5-Feb-03 11:39
clarkwuzhe5-Feb-03 11:39 
GeneralRe: How to tell whether a string is a number? Pin
Paresh Gheewala5-Feb-03 11:42
Paresh Gheewala5-Feb-03 11:42 
GeneralRe: How to tell whether a string is a number? Pin
Paresh Gheewala5-Feb-03 11:45
Paresh Gheewala5-Feb-03 11:45 
GeneralRe: How to tell whether a string is a number? Pin
clarkwuzhe5-Feb-03 11:46
clarkwuzhe5-Feb-03 11:46 
GeneralRe: How to tell whether a string is a number? Pin
Paresh Gheewala5-Feb-03 11:51
Paresh Gheewala5-Feb-03 11:51 
AnswerRe: How to tell whether a string is a number? Pin
Vasudevan Deepak Kumar5-Feb-03 17:53
Vasudevan Deepak Kumar5-Feb-03 17:53 

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.