Gustav Brock
Gustav at cactus.dk
Mon Sep 15 08:50:36 CDT 2008
Hi Shamil Found this which supports you: http://channel9.msdn.com/forums/TechOff/252416-C-and-WPF-progressbar/ Note the link near the bottom to this about the BackgroundWorker and why and how to use it: http://pavanpodila.spaces.live.com/blog/cns%219C9E888164859398%21246.entry /gustav >>> shamil at smsconsulting.spb.ru 15-09-2008 13:46 >>> OK, so you have to "fight laziness" there, and to develop generic solution using BackGroundWorker (in fact I did want to propose that effective "hint" first of all in my previous e-mail, but I didn't...) __ Shamil P.S. I do use BackGroundWorker (no laziness here :) ) - and it works well in rather intensive app querying web service, working with back-end db, and updating UI's progressbar and gridview and some statistics/progress status controls etc. -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Monday, September 15, 2008 2:51 PM To: dba-vb at databaseadvisors.com Subject: Re: [dba-VB] VS2008: ProgressBar displays on XP, not on Vista Hi Shamil I did, also progressBar1.Refresh(), but to no avail. It looks like there's no shortcut to the BackgroundWorker ... /gustav >>> shamil at smsconsulting.spb.ru 15-09-2008 12:16 >>> Hi Gustav, Try this "trick": System.Windows.Forms.Application.DoEvents(); -- Shamil -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Monday, September 15, 2008 1:05 PM To: dba-vb at databaseadvisors.com Subject: [dba-VB] VS2008: ProgressBar displays on XP, not on Vista Hi all I run a simple routine copying data between three databases in six steps. This lasts for about two minutes; in between a ProgressBar is advanced. This works fine when the app runs under WinXP, but under Vista 32-bit with the Aero interface either nothing happens or the ProgressBar updates once at some random step. The general advice is to use the BackgroundWorker for such tasks like the series of updates, but I'm lazy and wonder if a small trick can bring the ProgressBar to the surface and update under Vista as well. Any hints? /gustav