Click here to Skip to main content
16,007,809 members
Home / Discussions / C#
   

C#

 
GeneralRe: Checked Lists Help Pin
CKnig3-Dec-07 18:56
CKnig3-Dec-07 18:56 
GeneralRe: Checked Lists Help Pin
chanzeb3-Dec-07 19:03
chanzeb3-Dec-07 19:03 
GeneralRe: Checked Lists Help Pin
chanzeb3-Dec-07 19:04
chanzeb3-Dec-07 19:04 
QuestionHow to convert byte[] to string Pin
dungpapai3-Dec-07 17:31
dungpapai3-Dec-07 17:31 
GeneralRe: How to convert byte[] to string Pin
Vikram A Punathambekar3-Dec-07 17:37
Vikram A Punathambekar3-Dec-07 17:37 
QuestionHow to catch the text between two boundaries? Pin
Khoramdin3-Dec-07 17:03
Khoramdin3-Dec-07 17:03 
AnswerRe: How to catch the text between two boundaries? Pin
mav.northwind4-Dec-07 10:45
mav.northwind4-Dec-07 10:45 
QuestionBitmap reference somehow set to null - unwanted garbage collection? Pin
cdm5z3-Dec-07 15:32
cdm5z3-Dec-07 15:32 
I have a Bitmap reference "wavImg" inside of my custom UserControl. A method in this control, call it method "A" does the following:

wavImg = new Bitmap(x,y);
Graphics g = Graphics.FromImage(wavImage);
... drawing here
g.Dispose();

The OnPaint() method is overridden in the control and it checks if wavImg is null and if it's not, wavImg is drawn on the control.

Method A ends up being called by a GUI event handler, so it executes in the GUI thread. Likewise, OnPaint() is called from the GUI thread. The issue is that after "A" executes, the paint event happens, and OnPaint() is called, wavImg becomes null. The ONLY time wavImg is set to anything is in method A, the one assignment statement. Dispose() is NEVER called on wavImg.

How is it possible that wavImg becomes null?? There is exactly one reference to it in the class, so it shouldn't have been garbage collected. Any ideas are appreciated!

Thanks!
GeneralRe: Bitmap reference somehow set to null - unwanted garbage collection? Pin
CKnig3-Dec-07 18:47
CKnig3-Dec-07 18:47 
GeneralCan't write to multi-dimension DataSet Pin
MAW303-Dec-07 15:21
MAW303-Dec-07 15:21 
AnswerRe: Can't write to multi-dimension DataSet Pin
Vikram A Punathambekar3-Dec-07 17:35
Vikram A Punathambekar3-Dec-07 17:35 
GeneralRe: Can't write to multi-dimension DataSet Pin
MAW303-Dec-07 18:21
MAW303-Dec-07 18:21 
GeneralRe: Can't write to multi-dimension DataSet Pin
CKnig3-Dec-07 18:32
CKnig3-Dec-07 18:32 
GeneralRe: Can't write to multi-dimension DataSet Pin
Vikram A Punathambekar4-Dec-07 1:24
Vikram A Punathambekar4-Dec-07 1:24 
Questionhow to link expresssion blend to sql ddatabase Pin
angels7773-Dec-07 15:17
angels7773-Dec-07 15:17 
QuestionEmbedding dlls into exe and references from that dlls Pin
Coyote.Max3-Dec-07 13:13
Coyote.Max3-Dec-07 13:13 
GeneralRe: Embedding dlls into exe and references from that dlls Pin
Anthony Mushrow3-Dec-07 13:26
professionalAnthony Mushrow3-Dec-07 13:26 
GeneralProcess.Start Pin
eggie53-Dec-07 9:27
eggie53-Dec-07 9:27 
GeneralRe: Process.Start Pin
Sean Michael Murphy3-Dec-07 10:02
Sean Michael Murphy3-Dec-07 10:02 
Questiondisable HTML tags in DataGrid Cells ( VS.Net 2003 ) Pin
ALAQUNAIBI2-Dec-07 0:06
ALAQUNAIBI2-Dec-07 0:06 
AnswerRe: disable HTML tags in DataGrid Cells ( VS.Net 2003 ) Pin
pmarfleet2-Dec-07 0:17
pmarfleet2-Dec-07 0:17 
GeneralRe: disable HTML tags in DataGrid Cells ( VS.Net 2003 ) Pin
ALAQUNAIBI2-Dec-07 1:43
ALAQUNAIBI2-Dec-07 1:43 
Questionhow can create an application that can't kill it? Pin
Learn Searcher1-Dec-07 23:53
Learn Searcher1-Dec-07 23:53 
AnswerRe: how can create an application that can't kill it? Pin
pmarfleet2-Dec-07 0:15
pmarfleet2-Dec-07 0:15 
GeneralRe: how can create an application that can't kill it? Pin
Pete O'Hanlon3-Dec-07 11:02
mvePete O'Hanlon3-Dec-07 11:02 

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.