[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Mojo

2/15/2011 8:50:00 PM

Hi All

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've stuck to the method of showing the new form first and then hiding the
original afterwards, but in W7 you get a good second or two gap between form
display.

Does anybody have any pointers on how I could tighten this up?

Thanks


3 Answers

MikeD

2/15/2011 9:51:00 PM

0



"Mojo" <please@dont.spam.com> wrote in message
news:3eSdnW2G-5qYesfQnZ2dnUVZ8u0AAAAA@brightview.co.uk...
> Hi All
>
> 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've stuck to the method of showing the new form first and then hiding the
> original afterwards, but in W7 you get a good second or two gap between
> form
> display.
>
> Does anybody have any pointers on how I could tighten this up?

Windows 7 (and Vista) put much higher demands on your video card, especially
if you're using an Aero theme. You might just need a better card.

What you might want to try is turning of Aero (by choosing a non-Aero theme)
or Desktop Composition. To do the latter, right-click your EXE file and
select Properties. Click on the Compatibility tab. Add a checkmark to
"Disable desktop composition". You might want to try various other settings
on the Compatibility tab too. If you haven't built your EXE yet, try
disabling desktop composition for VB6.exe (the IDE is really affected by
this).

Failing that, can you post some code which demonstrates the problem (for
those with Win7 anyway)?

--
Mike


Mike Scirocco

2/25/2011 4:58:00 AM

0

On 2/15/2011 12:50 PM, Mojo wrote:
> Hi All
>
> 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've stuck to the method of showing the new form first and then hiding the
> original afterwards, but in W7 you get a good second or two gap between form
> display.
>
> Does anybody have any pointers on how I could tighten this up?
>
> Thanks

Would it be feasible to load the forms before you need to display them,
and toggle the visibility as you need them displayed?

Mike Williams

2/25/2011 9:40:00 AM

0

"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