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

C#

 
AnswerRe: How to transfer data between two form Pin
Apocalypse Now13-May-12 15:00
Apocalypse Now13-May-12 15:00 
GeneralRe: How to transfer data between two form Pin
Dave Kreskowiak14-May-12 2:15
mveDave Kreskowiak14-May-12 2:15 
GeneralRe: How to transfer data between two form Pin
Pete O'Hanlon14-May-12 2:56
mvePete O'Hanlon14-May-12 2:56 
QuestionCreate an object with a string. Pin
coolfetus11-May-12 17:44
coolfetus11-May-12 17:44 
AnswerRe: Create an object with a string. Pin
Luc Pattyn11-May-12 18:23
sitebuilderLuc Pattyn11-May-12 18:23 
Questionc# tutorial Pin
Shubham Vijay11-May-12 8:41
Shubham Vijay11-May-12 8:41 
AnswerRe: c# tutorial Pin
Ravi Bhavnani11-May-12 9:04
professionalRavi Bhavnani11-May-12 9:04 
QuestionDisplaying XHTML elements with namespaces in .NET WebBrowser control Pin
Orjan Westin11-May-12 5:08
professionalOrjan Westin11-May-12 5:08 
QuestionParent child relation through the designer Pin
Ronny Portier11-May-12 4:20
Ronny Portier11-May-12 4:20 
AnswerRe: Parent child relation through the designer Pin
Dave Kreskowiak11-May-12 7:25
mveDave Kreskowiak11-May-12 7:25 
AnswerRe: Parent child relation through the designer Pin
BillWoodruff12-May-12 16:54
professionalBillWoodruff12-May-12 16:54 
QuestionPicturebox and Progressbar question Pin
Hagen McCarthy11-May-12 4:13
Hagen McCarthy11-May-12 4:13 
AnswerRe: Picturebox and Progressbar question Pin
Sentenryu11-May-12 4:32
Sentenryu11-May-12 4:32 
GeneralRe: Picturebox and Progressbar question Pin
Hagen McCarthy11-May-12 4:39
Hagen McCarthy11-May-12 4:39 
GeneralRe: Picturebox and Progressbar question Pin
Sentenryu11-May-12 5:06
Sentenryu11-May-12 5:06 
GeneralRe: Picturebox and Progressbar question Pin
Hagen McCarthy11-May-12 5:10
Hagen McCarthy11-May-12 5:10 
GeneralRe: Picturebox and Progressbar question Pin
Hagen McCarthy11-May-12 5:21
Hagen McCarthy11-May-12 5:21 
GeneralRe: Picturebox and Progressbar question Pin
Hagen McCarthy11-May-12 4:59
Hagen McCarthy11-May-12 4:59 
AnswerRe: Picturebox and Progressbar question Pin
BobJanova11-May-12 6:37
BobJanova11-May-12 6:37 
GeneralRe: Picturebox and Progressbar question Pin
Hagen McCarthy11-May-12 7:37
Hagen McCarthy11-May-12 7:37 
AnswerRe: Picturebox and Progressbar question Pin
Alan N11-May-12 7:28
Alan N11-May-12 7:28 
Member 8956301 wrote:
// display image in picture box
pictureBox1.Image = new Bitmap(open.FileName);
pictureBox1.SizeMode = PictureBoxSizeMode.Zoom;
pictureBox1.WaitOnLoad = false;
pictureBox1.LoadAsync(open.FileName);


OK, let's break this code down line by line
1) Open the file, create a bitmap and set as the picturebox image
2) Set size mode
3) tell picturebox that future image loading will be async
4) Do async load from the file, this is now reloading

So you are loading the image twice.

I think all you need is
C#
pictureBox1.WaitOnLoad = false;
pictureBox1.LoadAsync(open.FileName);


Alan.
GeneralRe: Picturebox and Progressbar question Pin
Hagen McCarthy11-May-12 7:38
Hagen McCarthy11-May-12 7:38 
GeneralRe: Picturebox and Progressbar question Pin
Dave Kreskowiak12-May-12 4:33
mveDave Kreskowiak12-May-12 4:33 
GeneralRe: Picturebox and Progressbar question Pin
Hagen McCarthy14-May-12 2:27
Hagen McCarthy14-May-12 2:27 
QuestionWeb Camera Application using C# Pin
austinwales11-May-12 3:14
austinwales11-May-12 3:14 

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.