Click here to Skip to main content
15,889,495 members
Home / Discussions / C#
   

C#

 
GeneralRe: Change the appearance of the form Pin
max2929722-Jul-07 10:15
max2929722-Jul-07 10:15 
Question[STAThread] Pin
max2929720-Jul-07 14:20
max2929720-Jul-07 14:20 
AnswerRe: [STAThread] Pin
Luc Pattyn20-Jul-07 17:42
sitebuilderLuc Pattyn20-Jul-07 17:42 
QuestionFinding a Point on a Circle Pin
max2929720-Jul-07 14:11
max2929720-Jul-07 14:11 
AnswerRe: Finding a Point on a Circle Pin
Christian Graus20-Jul-07 20:38
protectorChristian Graus20-Jul-07 20:38 
AnswerRe: Finding a Point on a Circle Pin
blackjack215021-Jul-07 2:39
blackjack215021-Jul-07 2:39 
GeneralRe: Finding a Point on a Circle Pin
mav.northwind22-Jul-07 5:19
mav.northwind22-Jul-07 5:19 
QuestionImages, Email, Streams Pin
Will Code for Food20-Jul-07 10:32
Will Code for Food20-Jul-07 10:32 
I am attempting to write an image (System.Drawing.Image) to a MemoryStream using the supplied Image.Save(Stream, Format) command. I am doing this to add the image as an attachment to an email to be sent later. However the save command appears to be having no effect as the stream is empty after the command is executed. If someone could help me or tell me a better way to do this it would be greatly appreciated.

This is the code:

MemoryStream stream = new MemoryStream();
picture.Save(stream, picture.RawFormat);
int x;
while ((x = stream.ReadByte()) != -1)
Console.Write(x); //nothing get written
//Attachment attachment =
// new Attachment(stream, "Picture.jpg", "image/jpeg");
AnswerRe: Images, Email, Streams Pin
Guffa20-Jul-07 14:01
Guffa20-Jul-07 14:01 
QuestionC# on mobile devices Pin
Gareth H20-Jul-07 10:23
Gareth H20-Jul-07 10:23 
AnswerRe: C# on mobile devices Pin
leckey20-Jul-07 10:44
leckey20-Jul-07 10:44 
QuestionWindows Button control Pin
ridda78620-Jul-07 9:58
ridda78620-Jul-07 9:58 
AnswerRe: Windows Button control Pin
Paul Conrad20-Jul-07 10:26
professionalPaul Conrad20-Jul-07 10:26 
GeneralRe: Windows Button control Pin
ridda78620-Jul-07 20:02
ridda78620-Jul-07 20:02 
GeneralRe: Windows Button control Pin
Paul Conrad21-Jul-07 4:50
professionalPaul Conrad21-Jul-07 4:50 
Answerlogout problem[modified] Pin
daku120-Jul-07 9:46
daku120-Jul-07 9:46 
AnswerRe: C# logout ploblem Pin
daku120-Jul-07 13:11
daku120-Jul-07 13:11 
AnswerRe: C# logout ploblem Pin
T.EDY20-Jul-07 16:08
T.EDY20-Jul-07 16:08 
QuestionHelp with .chm Pin
RussBus20-Jul-07 9:39
RussBus20-Jul-07 9:39 
AnswerRe: Help with .chm Pin
leckey20-Jul-07 10:11
leckey20-Jul-07 10:11 
AnswerRe: Help with .chm Pin
ekynox20-Jul-07 14:21
ekynox20-Jul-07 14:21 
Questionc# literal conversion Pin
Chris Rickard20-Jul-07 9:33
Chris Rickard20-Jul-07 9:33 
AnswerRe: c# literal conversion Pin
Luc Pattyn20-Jul-07 17:45
sitebuilderLuc Pattyn20-Jul-07 17:45 
GeneralRe: c# literal conversion Pin
Chris Rickard20-Jul-07 18:07
Chris Rickard20-Jul-07 18:07 
GeneralRe: c# literal conversion Pin
Luc Pattyn20-Jul-07 18:21
sitebuilderLuc Pattyn20-Jul-07 18:21 

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.