Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
Generalconvert XML X.509Certificates Pin
pelos21-Jul-04 0:47
pelos21-Jul-04 0:47 
GeneralRe: convert XML X.509Certificates Pin
Heath Stewart21-Jul-04 6:32
protectorHeath Stewart21-Jul-04 6:32 
GeneralRe: convert XML X.509Certificates Pin
pelos21-Jul-04 6:54
pelos21-Jul-04 6:54 
GeneralRe: convert XML X.509Certificates Pin
Heath Stewart21-Jul-04 9:17
protectorHeath Stewart21-Jul-04 9:17 
GeneralRe: convert XML X.509Certificates Pin
pelos21-Jul-04 12:50
pelos21-Jul-04 12:50 
GeneralThreads and UI Pin
LukeM21-Jul-04 0:27
LukeM21-Jul-04 0:27 
GeneralRe: Threads and UI Pin
Gary Thom21-Jul-04 3:31
Gary Thom21-Jul-04 3:31 
GeneralA generic error occurred in GDI+ Pin
Member 94012520-Jul-04 23:39
Member 94012520-Jul-04 23:39 
My C# project needs to open a picture from an existent filepath,
after some processes, write back with the same filename.

I used filestream to open and save my file,
<br />
using(FileStream open = new FileStream(path,FileMode.Open,FileAccess.ReadWrite,FileShare.ReadWrite))<br />
{<br />
   using (Image img = Image.FromStream(open))<br />
   myPicture.PictureBox.Image = (Image)img.Clone();		<br />
}<br />
...<br />
...<br />
using(FileStream saveStream = new FileStream(path, FileMode.OpenOrCreate, FileAccess.ReadWrite,FileShare.ReadWrite))<br />
{<br />
   PictureBox.Image.Save(saveStream,System.Drawing.Imaging.ImageFormat.Bmp);<br />
}<br />


I can open my picture and show it successfully,
but when I want to save,
there's always "A generic error occurred in GDI+" message except the first time,
I find it seems to be the problem of permission,
but I don't know the solution.
Can anyone tell me how to solve it...??
Thanks a lot!!
General? Open an already opened file Pin
catalin_im20-Jul-04 23:09
catalin_im20-Jul-04 23:09 
GeneralRe: ? Open an already opened file Pin
Colin Angus Mackay21-Jul-04 0:51
Colin Angus Mackay21-Jul-04 0:51 
GeneralRe: ? Open an already opened file Pin
Heath Stewart21-Jul-04 6:24
protectorHeath Stewart21-Jul-04 6:24 
Generallock table in ms sql Pin
evoseven20-Jul-04 22:38
evoseven20-Jul-04 22:38 
GeneralRe: lock table in ms sql Pin
Nick Parker21-Jul-04 3:09
protectorNick Parker21-Jul-04 3:09 
GeneralRe: lock table in ms sql Pin
Steven Campbell21-Jul-04 3:16
Steven Campbell21-Jul-04 3:16 
GeneralRe: lock table in ms sql Pin
evoseven21-Jul-04 13:17
evoseven21-Jul-04 13:17 
QuestionWindows XP firewall influence the traffic of ActiveSync? Pin
ting66820-Jul-04 22:31
ting66820-Jul-04 22:31 
AnswerRe: Windows XP firewall influence the traffic of ActiveSync? Pin
Heath Stewart21-Jul-04 6:20
protectorHeath Stewart21-Jul-04 6:20 
GeneralWebRequest and customized .config Pin
Corinna John20-Jul-04 22:02
Corinna John20-Jul-04 22:02 
GeneralRe: WebRequest and customized .config Pin
Heath Stewart21-Jul-04 6:17
protectorHeath Stewart21-Jul-04 6:17 
GeneralStarting service from another Pin
SatyaDY20-Jul-04 19:38
SatyaDY20-Jul-04 19:38 
GeneralRe: Starting service from another Pin
Heath Stewart21-Jul-04 5:51
protectorHeath Stewart21-Jul-04 5:51 
GeneralProb with service Pin
SatyaDY20-Jul-04 18:00
SatyaDY20-Jul-04 18:00 
GeneralRe: Prob with service Pin
Heath Stewart21-Jul-04 4:50
protectorHeath Stewart21-Jul-04 4:50 
QuestionHow to do with SVG path string? Pin
luming112233445520-Jul-04 16:53
luming112233445520-Jul-04 16:53 
AnswerRe: How to do with SVG path string? Pin
J. Dunlap20-Jul-04 19:25
J. Dunlap20-Jul-04 19:25 

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.