Re: Progressbar when loading imagefile

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I suggest implementing IStream yourself and sending notifications, perhaps
via some event, to your progress-indicator.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





"Johnny Granberg" <JohnnyGranberg@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:E0646AAD-CE5F-4F63-AD70-BB706A0A0A82@xxxxxxxxxxxxxxxx
> im trying to figure out how to make a progressbar when loading images....
>
> im using the following code to open the file:
>
> Dim bmpInputStream As IO.Stream
> Dim bmpSourceBitmap As Bitmap
>
> bmpInputStream = File.OpenRead(InputFilenames(SourceImageNumber))
> bmpSourceBitmap = DirectCast(Image.FromStream(bmpInputStream, True, True),
> Bitmap)
>
> is there any other way i can do it so i can see the progress of the file
> load ?
> since the images a load is quite big it takes a while to load, so it would
> be nice to get some feedback from the program....
>
> Thanks...
>
>


.