Mike Williams
2/25/2011 9:40:00 AM
"Mojo" <please@dont.spam.com> wrote in message
news:3eSdnW2G-5qYesfQnZ2dnUVZ8u0AAAAA@brightview.co.uk...
> My vb6 app uses a number of forms and in W7 you can see
> a definite lag between forms when my app flicks between them.
> In XP you can hardly see the 'join'.
I don't think it is the actual display of the Form itself which is taking so
much time (once the Form is ready to be displayed), and I think that if you
test the display of a standard blank Form with just a dozen or so standard
Controls on it on your Win7 machine then a new Form will display immediately
when you switch to it. The problem is more likely to be the speed (or lack
of speed) of whatever code you have in its Load event, and unless you have a
Show statement near the start of the Load event code then the Form will not
display itself until the Load event finishes (the Show statement won't speed
anything up of course, but it might let you see a little more about what is
going on, depending on what the problem actually is).
Perhaps your Load event code is reading a lot of data from somewhere that is
very much slower on your Win7 machine than it was on your XP machine. Or
possibly you have code in the Form's load event that is making very heavy
use of GDI drawing operations. Are you using a lot of those? The thing is
that on XP machines with a half decent graphics card most GDI drawing and
rendering functions are hardware accelerated and are actually carried out in
parallel with the main processor in a separate block of memory that actually
lives on the graphics card itself by specially accelerated firmware routines
run by the processor that lives on your graphics card. Vista killed all that
GDI hardware acceleration stuff and all GDI drawing and rendering functions
in Vista are performed, usually much more slowly, in software in the main
system memory by the main processor. I'm not too sure about Win7 but I think
that it too kills all the GDI hardware acceleration (except that I think
Micro$oft took at least a little bit of notice of the furore caused by
Vista's killing of all GDI hardware accelaration and have partially
reinstated it /only/ for blitting operations (I'm not in a position to test
that at the moment though so that's just a guess). However, Win7 certainly
kills most of the GDI hardware accelaration (and Vista kills it all), that's
for sure. Some things are particularly hard hit by this, for example large
Blits and PolyLine and other Poly functions. Anyway, you haven't yet posted
any details of what your app is actually doing when it displays its Forms
and so we can only guess at what your problem is, but it might be worth you
having a look at the things I have mentioned. Perhaps you can come up with a
reasonably small test app that clearly displays the problem you have
mentioned and post it to the group so that we can have a look at it.
Mike