|
And a breakpoint didn't come up with much help.
|
|
|
|
|
Did you set the Maximum on the progress bar to be something sensible?
|
|
|
|
|
I have the Min set to 0 and the Max set to 100.
|
|
|
|
|
Member 8956301 wrote: 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
pictureBox1.WaitOnLoad = false;
pictureBox1.LoadAsync(open.FileName);
Alan.
|
|
|
|
|
Thanks for catching that for me. I've made that corrections but the progress bar still does nothing.
|
|
|
|
|
So how long is it taking to load the image?? The ProgressChange event if only fired every once in a while, not on every byte that's loaded. It may not even be fired at 100% either.
There's a second event that you can handle to get notified that the image is completely loaded. That's the LoadCompleted event. When this one is raised, you can set your progress bar to 100% and consider the operation done.
|
|
|
|
|
It's taking a good 10 to 12 seconds to open.
|
|
|
|
|
I need help with an SDK to develop an application that will work with the built in camera or any external camera. The camera should be able to take snapshots.. This application will of course be used on windows and will be programmed with C#..
|
|
|
|
|
What part of the app do you need help with? Please indicate what you've tried and ask a more specific question if possible. This will allow us to help you better.
/ravi
|
|
|
|
|
i know i shouldn't do this (post here), but actually i'm interested in this kind of thing to, you have any material about how to connect to built-in web cams from c#? or a starting point? i've only found unmanaged solutions, so if you have any managed solution, please share...
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|
|
Sentenryu wrote: or a starting point?
Did you try to search this site? We got a lot of articles on webcam's, and most of them are in managed code.
Bastard Programmer from Hell
|
|
|
|
|
tried, only found solutions that use a unmanaged dll, i'll try once more...
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|
|
Try this[^] one.
Bastard Programmer from Hell
|
|
|
|
|
thanks, i've seen this article, the problem is that i can't use external dlls (stupid requirement that i'm trying to remove...)
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|
|
How about this[^] fully managed solution?
/ravi
|
|
|
|
|
5 doesn't seems enough to thank you for that, this solution is perfecty
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|
|
Glad to be of help!
/ravi
|
|
|
|
|
I need to be able to use my c# written code to access my webcam(in-built). The one i got from this site isn't what I wanted. This application should be with winforms not wpf
|
|
|
|
|
What prevents you from embedding the WPF window containing the MediaElement in your WinForms app?
/ravi
|
|
|
|
|
Please can I just get the application or sdk.......... I neeed it urgently
|
|
|
|
|
Hello!
I'm trying to create a Regex so it would work same to String.Contains. In general I just create Regex from the string, but there are a lot of problems here: the string may contain +, * and other characters so Regex throws exception as it does not likes this.
I assume that Rexeg.IsMatch works faster than String.Contains so I'd like to use it.
Do you know how to work this around? I could replace all the escape characters in my string to \+. Maybe there is something better?
Thanks.
modified 11-May-12 5:35am.
|
|
|
|
|
You can use the Regex.IsMatch() method[^].
|
|
|
|
|
The question is how to build Regex
|
|
|
|
|
If you are testing against something that is considered a special character, then you have no choice but to escape the character. This is no different than having to escape something like \n in C#.
|
|
|
|
|
Pete O'Hanlon wrote: you have no choice but to escape the character
There's no escape, but to escape!
"With sufficient thrust, pigs fly just fine."
Ross Callon, The Twelve Networking Truths, RFC1925
|
|
|
|