Click here to Skip to main content
15,924,038 members
Home / Discussions / C#
   

C#

 
GeneralRe: User control as base class Pin
Ronny Portier17-May-12 5:27
Ronny Portier17-May-12 5:27 
AnswerRe: User control as base class Pin
RobCroll18-May-12 2:19
RobCroll18-May-12 2:19 
QuestionHow to read and insert files from Application directory in to Data base in C# Pin
ChandrakanthGaddam17-May-12 1:04
ChandrakanthGaddam17-May-12 1:04 
AnswerRe: How to read and insert files from Application directory in to Data base in C# Pin
Dave Kreskowiak17-May-12 2:13
mveDave Kreskowiak17-May-12 2:13 
AnswerRe: How to read and insert files from Application directory in to Data base in C# Pin
Luc Pattyn17-May-12 2:13
sitebuilderLuc Pattyn17-May-12 2:13 
QuestionDisposing GDI objects Pin
thalavi17-May-12 0:35
thalavi17-May-12 0:35 
AnswerRe: Disposing GDI objects Pin
Dave Kreskowiak17-May-12 2:10
mveDave Kreskowiak17-May-12 2:10 
AnswerRe: Disposing GDI objects Pin
Luc Pattyn17-May-12 2:11
sitebuilderLuc Pattyn17-May-12 2:11 
You should dispose explicitly of any objects that offer a Dispose() method, in a WinForms GUI environment that would include Fonts, Pens, Brushes, etc. And also any Graphics, which you normally don't need to create at all as the Paint handler provides one for free (you should NOT dispose of that one, you did not cause its creation!).

I typically do not create new Fonts/Pens/Brushes in my Paint handler, I create them once and keep them around as static class members (gives better performance), and I do not dispose of them at all. Them being static means extra instances of the Form don't add to the GDI count.

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum

QuestionQuestion Related To Yesterdays Array of String..... Pin
glennPattonWork316-May-12 23:44
professionalglennPattonWork316-May-12 23:44 
AnswerRe: Question Related To Yesterdays Array of String..... Pin
BobJanova16-May-12 23:59
BobJanova16-May-12 23:59 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 0:13
professionalglennPattonWork317-May-12 0:13 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
BobJanova17-May-12 4:52
BobJanova17-May-12 4:52 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 5:37
professionalglennPattonWork317-May-12 5:37 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 1:05
professionalglennPattonWork317-May-12 1:05 
AnswerRe: Question Related To Yesterdays Array of String..... Pin
Luc Pattyn17-May-12 2:17
sitebuilderLuc Pattyn17-May-12 2:17 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 2:28
professionalglennPattonWork317-May-12 2:28 
AnswerRe: Question Related To Yesterdays Array of String..... Pin
Luc Pattyn17-May-12 2:59
sitebuilderLuc Pattyn17-May-12 2:59 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 3:12
professionalglennPattonWork317-May-12 3:12 
AnswerRe: Question Related To Yesterdays Array of String..... Pin
Luc Pattyn17-May-12 3:27
sitebuilderLuc Pattyn17-May-12 3:27 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 3:30
professionalglennPattonWork317-May-12 3:30 
AnswerRe: Question Related To Yesterdays Array of String..... Pin
Luc Pattyn17-May-12 3:35
sitebuilderLuc Pattyn17-May-12 3:35 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 3:39
professionalglennPattonWork317-May-12 3:39 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
BobJanova17-May-12 4:53
BobJanova17-May-12 4:53 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
Luc Pattyn17-May-12 4:56
sitebuilderLuc Pattyn17-May-12 4:56 
AnswerRe: Question Related To Yesterdays Array of String..... Pin
PIEBALDconsult17-May-12 3:19
mvePIEBALDconsult17-May-12 3:19 

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.