Click here to Skip to main content
16,004,974 members
Home / Discussions / C#
   

C#

 
GeneralXmlDocument Write problems and Add Identation Help! Pin
Chua Wen Ching5-Jan-05 23:40
Chua Wen Ching5-Jan-05 23:40 
GeneralRe: XmlDocument Write problems and Add Identation Help! Pin
Stanimir_Stoyanov6-Jan-05 0:07
Stanimir_Stoyanov6-Jan-05 0:07 
GeneralRe: XmlDocument Write problems and Add Identation Help! Pin
J4amieC6-Jan-05 3:03
J4amieC6-Jan-05 3:03 
GeneralRe: XmlDocument Write problems and Add Identation Help! Pin
Chua Wen Ching6-Jan-05 13:34
Chua Wen Ching6-Jan-05 13:34 
GeneralList View items - exporting and importing data Pin
Stanimir_Stoyanov5-Jan-05 22:43
Stanimir_Stoyanov5-Jan-05 22:43 
GeneralRe: List View items - exporting and importing data Pin
Patric_J6-Jan-05 10:55
Patric_J6-Jan-05 10:55 
GeneralPrint without preview in C# Pin
gbess5-Jan-05 22:39
gbess5-Jan-05 22:39 
Generalimage screensaver with mem probs Pin
Steven_T5-Jan-05 20:41
Steven_T5-Jan-05 20:41 
^ Hi,
since I have two monitors now, and my desktop is expanded across both,
I wanted an screensaver for both monitors, just showing an image.
The screensaver needs to strecth the image across both screens.

With the help of the code from the CP screensaver I got it working.
Only it keeps using more memory every time the image changes.
I think it's a simple problem not releasing the image, but I a bit of a noob.

Can someone help me on my way?

Grtz, Steven.
############################################################
...
// holder for bitmaps in folder:
private long maxImageIndex = 0;
private long myBitmapIndex = 0;
private string[] myBitmapStrings;

// temp holder for bitmap:
private Bitmap myBitmap;

...

private void loadPicture()
{
try
{
myBitmap = new Bitmap(Image.FromFile(myBitmapStrings[myBitmapIndex]), rcScreen.Width, rcScreen.Height);
this.pictureBox1.Image = myBitmap;
Console.WriteLine("Loaded image " + myBitmapIndex + ": " + myBitmapStrings[myBitmapIndex]);
}
catch(Exception e)
{
Console.WriteLine("There has been an error loading the picture: " + e.Message);
}
}
...
############################################################
GeneralRe: image screensaver with mem probs Pin
perlmunger6-Jan-05 6:11
perlmunger6-Jan-05 6:11 
GeneralRe: image screensaver with mem probs Pin
Steven_T6-Jan-05 21:21
Steven_T6-Jan-05 21:21 
GeneralRe: image screensaver with mem probs Pin
Steven_T6-Jan-05 23:23
Steven_T6-Jan-05 23:23 
QuestionHow to get explorer like (custom?) controls. Pin
E_NoName5-Jan-05 16:30
E_NoName5-Jan-05 16:30 
AnswerRe: How to get explorer like (custom?) controls. Pin
Alex Korchemniy5-Jan-05 19:18
Alex Korchemniy5-Jan-05 19:18 
GeneralProblem having Rational XDE Pin
amalatsliit5-Jan-05 15:00
amalatsliit5-Jan-05 15:00 
GeneralRe: Problem having Rational XDE Pin
Nick Parker6-Jan-05 7:06
protectorNick Parker6-Jan-05 7:06 
GeneralRe: Problem having Rational XDE Pin
amalatsliit6-Jan-05 15:01
amalatsliit6-Jan-05 15:01 
GeneralApplication.Exit Pin
Nbip5-Jan-05 14:30
Nbip5-Jan-05 14:30 
GeneralRe: Application.Exit Pin
Stefan Troschuetz5-Jan-05 20:57
Stefan Troschuetz5-Jan-05 20:57 
GeneralRe: Application.Exit Pin
Gavin Jeffrey5-Jan-05 22:43
Gavin Jeffrey5-Jan-05 22:43 
GeneralRe: Application.Exit Pin
Dave Kreskowiak6-Jan-05 5:55
mveDave Kreskowiak6-Jan-05 5:55 
GeneralRe: Application.Exit Pin
Nbip6-Jan-05 16:45
Nbip6-Jan-05 16:45 
Generalparams parameter Pin
Yaakov Davis5-Jan-05 12:10
Yaakov Davis5-Jan-05 12:10 
GeneralRe: params parameter Pin
Yaakov Davis5-Jan-05 12:27
Yaakov Davis5-Jan-05 12:27 
Generalref vs. out keyword Pin
Yaakov Davis5-Jan-05 10:58
Yaakov Davis5-Jan-05 10:58 
GeneralRe: ref vs. out keyword Pin
Charlie Williams5-Jan-05 11:40
Charlie Williams5-Jan-05 11:40 

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.