Click here to Skip to main content
15,879,095 members
Home / Discussions / C#
   

C#

 
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 
I have a win form that you can click a browse button - navigate to your image file - and view the image in the win form. I've been trying to associate my progress bar to the load time of the image selected with no success. Can anyone take a look at my code and see what I'm missing?

C#
private void startButton_Click(object sender, EventArgs e) //Opens file browsing dialog
       {
               OpenFileDialog open = new OpenFileDialog();
               open.FileName = "";
               open.Filter = "Image Files(*.tif; *.jpg; *.jpeg; *.gif; *.bmp)|*.tif; *.jpg; *.jpeg; *.gif; *.bmp";
               open.InitialDirectory = @"g:\All Scanned Jobs\";
               if (open.ShowDialog() != DialogResult.Cancel)
               {
                   // display image in picture box
                   pictureBox1.Image = new Bitmap(open.FileName);
                   pictureBox1.SizeMode = PictureBoxSizeMode.Zoom;
                   pictureBox1.WaitOnLoad = false;
                   pictureBox1.LoadAsync(open.FileName);
               }
       }
       void pictureBox1_LoadProgressChanged(object sender, ProgressChangedEventArgs e) //Sets pBar value as file opens
       {
           progressBar1.Value = e.ProgressPercentage;
       }

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 
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 
AnswerRe: Web Camera Application using C# Pin
Ravi Bhavnani11-May-12 3:25
professionalRavi Bhavnani11-May-12 3:25 
GeneralRe: Web Camera Application using C# Pin
Sentenryu11-May-12 4:41
Sentenryu11-May-12 4:41 
AnswerRe: Web Camera Application using C# Pin
Eddy Vluggen11-May-12 5:46
professionalEddy Vluggen11-May-12 5:46 
GeneralRe: Web Camera Application using C# Pin
Sentenryu11-May-12 6:53
Sentenryu11-May-12 6:53 

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.