Click here to Skip to main content
15,891,423 members
Home / Discussions / C#
   

C#

 
GeneralRe: Match and Regular Expression Pin
Paul Riley7-Oct-02 4:59
Paul Riley7-Oct-02 4:59 
GeneralRe: Match and Regular Expression Pin
Richard Deeming7-Oct-02 6:02
mveRichard Deeming7-Oct-02 6:02 
QuestionHow to convert byte[] to int[]? Pin
Konstantin Vasserman7-Oct-02 3:49
Konstantin Vasserman7-Oct-02 3:49 
AnswerRe: How to convert byte[] to int[]? Pin
Paul Riley7-Oct-02 5:17
Paul Riley7-Oct-02 5:17 
GeneralRe: How to convert byte[] to int[]? Pin
Konstantin Vasserman7-Oct-02 5:38
Konstantin Vasserman7-Oct-02 5:38 
GeneralRe: How to convert byte[] to int[]? Pin
Paul Riley7-Oct-02 5:55
Paul Riley7-Oct-02 5:55 
GeneralRe: How to convert byte[] to int[]? Pin
Konstantin Vasserman7-Oct-02 6:07
Konstantin Vasserman7-Oct-02 6:07 
GeneralRe: How to convert byte[] to int[]? Pin
leppie7-Oct-02 7:20
leppie7-Oct-02 7:20 
GeneralRe: How to convert byte[] to int[]? Pin
Konstantin Vasserman7-Oct-02 7:48
Konstantin Vasserman7-Oct-02 7:48 
GeneralRe: How to convert byte[] to int[]? Pin
Richard Deeming7-Oct-02 7:42
mveRichard Deeming7-Oct-02 7:42 
GeneralRe: How to convert byte[] to int[]? Pin
Konstantin Vasserman7-Oct-02 7:55
Konstantin Vasserman7-Oct-02 7:55 
GeneralDataGrid Updates Pin
Dave Moor7-Oct-02 1:25
Dave Moor7-Oct-02 1:25 
QuestionHow to use scripts in my applicaction?!? Pin
EdgarBM6-Oct-02 23:58
EdgarBM6-Oct-02 23:58 
GeneralAspose.Obfuscator 1.0 Released! Pin
Aspose Pty Ltd6-Oct-02 21:31
Aspose Pty Ltd6-Oct-02 21:31 
GeneralRe: Aspose.Obfuscator 1.0 Released! Pin
Stephane Rodriguez.6-Oct-02 22:19
Stephane Rodriguez.6-Oct-02 22:19 
GeneralRe: Aspose.Obfuscator 1.0 Released! Pin
leppie7-Oct-02 8:24
leppie7-Oct-02 8:24 
GeneralRe: Aspose.Obfuscator 1.0 Released! Pin
Patrick Lassalle14-Oct-02 12:01
Patrick Lassalle14-Oct-02 12:01 
Questionsetup wizered? Pin
imran_rafique6-Oct-02 17:45
imran_rafique6-Oct-02 17:45 
GeneralC# Debug problem in VS7 Pin
Elf6-Oct-02 16:45
Elf6-Oct-02 16:45 
GeneralRe: C# Debug problem in VS7 Pin
Russell Morris7-Oct-02 6:28
Russell Morris7-Oct-02 6:28 
GeneralVideo Streaming Pin
yccheok6-Oct-02 16:13
yccheok6-Oct-02 16:13 
GeneralRe: Video Streaming Pin
Daniel Strigl6-Oct-02 20:12
Daniel Strigl6-Oct-02 20:12 
GeneralRe: Video Streaming Pin
yccheok6-Oct-02 20:16
yccheok6-Oct-02 20:16 
GeneralRe: Video Streaming Pin
Philip Fitzsimons7-Oct-02 3:21
Philip Fitzsimons7-Oct-02 3:21 
GeneralEditing Bitmap File When PictureBox.Image Point To It Pin
yccheok6-Oct-02 15:31
yccheok6-Oct-02 15:31 
------------------------------------
Bitmap b = new Bitmap("\\live.jpg");
this.pictureBox1.Image = b;
------------------------------------

i make my picture box point to live.jpg. when i try to edit the live.jpg (ie:when i try to replace the live.jpg, or i try to call Bitmap.Save("live.jpg") in another thread), i was not allowed to do so.

i try to change the code to:
------------------------------------
Bitmap b = new Bitmap("\\live.jpg");
this.pictureBox1.Image = b;
b.Dispose();
b = null;
------------------------------------
this will cause the run-time error n make the picture box diaplay a BIG cross instead of the content of live.jpg.

i then try to duplicate the bitmap using:
------------------------------------
Bitmap b = new Bitmap("\\live.jpg");
this.pictureBox1.Image = b.Clone(new Rectangle(0, 0, b.Size.Width, b.Size.Height), b.PixelFormat);
b.Dispose();
b = null;
------------------------------------

now, i still cannot edit the live.jpg (ie:when i try to replace the live.jpg, or i try to call Bitmap.Save("live.jpg") in another thread).

how can i release the handle to live.jpg file and at the same time let the picture box to have the content of live.jpg.

thank you.

regards
yccheok

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.