Click here to Skip to main content
15,886,724 members
Home / Discussions / C#
   

C#

 
AnswerRe: Killing proccesses programatically Pin
dan!sh 22-May-09 23:33
professional dan!sh 22-May-09 23:33 
GeneralRe: Killing proccesses programatically Pin
Mycroft Holmes23-May-09 2:02
professionalMycroft Holmes23-May-09 2:02 
AnswerRe: Killing proccesses programatically Pin
0x3c023-May-09 2:37
0x3c023-May-09 2:37 
JokeRe: Killing proccesses programatically Pin
dan!sh 23-May-09 5:32
professional dan!sh 23-May-09 5:32 
GeneralRe: Killing proccesses programatically Pin
Luc Pattyn23-May-09 5:44
sitebuilderLuc Pattyn23-May-09 5:44 
JokeRe: Killing proccesses programatically Pin
0x3c023-May-09 6:12
0x3c023-May-09 6:12 
QuestionGrab an image on memory Pin
Massimo Barbon22-May-09 21:49
Massimo Barbon22-May-09 21:49 
AnswerRe: Grab an image on memory Pin
beatles169223-May-09 1:37
beatles169223-May-09 1:37 
You can use a byte array to save any binary files in memory.
If you are dealing with an System.Drawing.Image object I suggest you serialize it into a memory stream,get memory stream buffer and let the memory stream go.

<br />
byte[] myImage;<br />
using(var ms=new MemoryStream())<br />
{<br />
var bf=new BinaryFormatter();<br />
bf.Serialize(ms,theImage);<br />
myImage=ms.GetBuffer();<br />
ms.Close();<br />
}<br />


You can use a BinaryFormatter again to deserialize myImage into an Image object.

<br />
Image theImage;<br />
using(var ms=new MemoryStream(myImage))<br />
{<br />
var bf=new BinaryFormatter();<br />
theImage=(Image)bf.Deserialize(ms);<br />
ms.Close();<br />
}<br />


Note : System.Draw.Image is serializable so we can serialize and deserialize it .To use the same method on nonserializable objects there should be a way to write content of the image into a memory stream.
Questionhow to update gridview? Pin
priya1515s22-May-09 21:09
priya1515s22-May-09 21:09 
AnswerRe: how to update gridview? Pin
noorahmad22-May-09 21:49
noorahmad22-May-09 21:49 
AnswerRe: how to update gridview? Pin
Mycroft Holmes22-May-09 21:49
professionalMycroft Holmes22-May-09 21:49 
Questionspecial thread from monitor Pin
shahin gholami22-May-09 20:35
shahin gholami22-May-09 20:35 
AnswerRe: special thread from monitor Pin
Manas Bhardwaj22-May-09 22:46
professionalManas Bhardwaj22-May-09 22:46 
GeneralRe: special thread from monitor Pin
shahin gholami23-May-09 2:48
shahin gholami23-May-09 2:48 
QuestionProblem while loading the form Pin
lnmca22-May-09 18:57
lnmca22-May-09 18:57 
AnswerRe: Problem while loading the form Pin
Mycroft Holmes22-May-09 21:45
professionalMycroft Holmes22-May-09 21:45 
QuestionCrystal controle in C#.net Pin
KIDYA22-May-09 18:55
KIDYA22-May-09 18:55 
QuestionLogin code Pin
KIDYA22-May-09 18:52
KIDYA22-May-09 18:52 
AnswerRe: Login code Pin
padmanabhan N22-May-09 18:56
padmanabhan N22-May-09 18:56 
GeneralRe: Login code Pin
KIDYA22-May-09 19:02
KIDYA22-May-09 19:02 
AnswerRe: Login code Pin
MumbleB22-May-09 20:18
MumbleB22-May-09 20:18 
GeneralRe: Login code Pin
KIDYA22-May-09 20:36
KIDYA22-May-09 20:36 
AnswerRe: Login code Pin
Mycroft Holmes22-May-09 21:41
professionalMycroft Holmes22-May-09 21:41 
QuestionCross Threads problemo (invalidoperationexception) Pin
Quake2Player22-May-09 15:47
Quake2Player22-May-09 15:47 
AnswerRe: Cross Threads problemo (invalidoperationexception) Pin
Luc Pattyn22-May-09 16:09
sitebuilderLuc Pattyn22-May-09 16:09 

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.