Click here to Skip to main content
15,885,141 members
Home / Discussions / C#
   

C#

 
AnswerRe: accessing hardware information Pin
half-life27-Jul-08 5:58
half-life27-Jul-08 5:58 
QuestionConvert Mp3 to Wave Files Pin
SHINOJK27-Jul-08 1:25
SHINOJK27-Jul-08 1:25 
AnswerRe: Convert Mp3 to Wave Files Pin
Ian Uy27-Jul-08 3:21
Ian Uy27-Jul-08 3:21 
QuestionInitializing Byte Array, IndexOutOfRange Exception Pin
Ian Uy27-Jul-08 0:05
Ian Uy27-Jul-08 0:05 
AnswerRe: Initializing Byte Array, IndexOutOfRange Exception Pin
Guffa27-Jul-08 2:54
Guffa27-Jul-08 2:54 
Questionredirecting page to another page Pin
scottichrosaviakosmos26-Jul-08 23:57
scottichrosaviakosmos26-Jul-08 23:57 
QuestionA generic error occurred in GDI+ [modified] Pin
Rob Manderson26-Jul-08 23:41
protectorRob Manderson26-Jul-08 23:41 
AnswerRe: A generic error occurred in GDI+ Pin
Luc Pattyn27-Jul-08 1:08
sitebuilderLuc Pattyn27-Jul-08 1:08 
Hi,

this is my standard advice on Image.Save problems:

Most, if not all, errors inside GDI+ are reported as "generic problem occurred in
GDI+". If the affected line is an Image.Save chances are your path is incorrect or
inaccessible, your disk is full, or your destination file exists and is locked.

if you load an image from a file, most of the time the file remains locked as long as
the Image is alive. This would prevent you from saving an image to the same path.

It applies to Image.FromFile, and probably also to PictureBox.ImageLocation
The one exception I am aware of is when you use Image.FromStream

An alternative work-around is to work with a copy of the image:
load the image with Image.FromFile,
create a new image from it with new Bitmap(Image),
dispose of the original image.

Hope this helps.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

Voting for dummies? No thanks. Dead | X|


GeneralRe: A generic error occurred in GDI+ Pin
Rob Manderson27-Jul-08 8:08
protectorRob Manderson27-Jul-08 8:08 
GeneralRe: A generic error occurred in GDI+ Pin
Luc Pattyn27-Jul-08 8:18
sitebuilderLuc Pattyn27-Jul-08 8:18 
QuestionC# code for optimal path, given adjacency matrix/cost values? Pin
sherifffruitfly26-Jul-08 18:51
sherifffruitfly26-Jul-08 18:51 
AnswerRe: C# code for optimal path, given adjacency matrix/cost values? Pin
Paul Conrad26-Jul-08 19:41
professionalPaul Conrad26-Jul-08 19:41 
AnswerRe: C# code for optimal path, given adjacency matrix/cost values? Pin
Robert.C.Cartaino27-Jul-08 6:14
Robert.C.Cartaino27-Jul-08 6:14 
QuestionDays until next birthday Pin
DFlat4Now26-Jul-08 16:59
DFlat4Now26-Jul-08 16:59 
AnswerRe: Days until next birthday Pin
Reza Raad26-Jul-08 17:36
Reza Raad26-Jul-08 17:36 
GeneralRe: Days until next birthday Pin
DFlat4Now26-Jul-08 18:31
DFlat4Now26-Jul-08 18:31 
QuestionRe: Days until next birthday Pin
DFlat4Now26-Jul-08 18:55
DFlat4Now26-Jul-08 18:55 
AnswerRe: Days until next birthday Pin
Paul Conrad26-Jul-08 19:52
professionalPaul Conrad26-Jul-08 19:52 
AnswerRe: Days until next birthday Pin
Reza Raad26-Jul-08 21:43
Reza Raad26-Jul-08 21:43 
AnswerRe: Days until next birthday Pin
Guffa27-Jul-08 2:59
Guffa27-Jul-08 2:59 
QuestionExe Control DLL Pin
nedracix26-Jul-08 16:20
nedracix26-Jul-08 16:20 
AnswerRe: Exe Control DLL Pin
Paul Conrad26-Jul-08 17:55
professionalPaul Conrad26-Jul-08 17:55 
QuestionWhere is HttpUtility.HtmlDecode ? Pin
Mohammad Dayyan26-Jul-08 12:06
Mohammad Dayyan26-Jul-08 12:06 
AnswerRe: Where is HttpUtility.HtmlDecode ? Pin
Lutosław26-Jul-08 12:22
Lutosław26-Jul-08 12:22 
GeneralRe: Where is HttpUtility.HtmlDecode ? Pin
Mohammad Dayyan26-Jul-08 12:28
Mohammad Dayyan26-Jul-08 12:28 

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.