VB.NET slower than VB6!?

mpappert

Well-known member
Joined
Oct 5, 2002
Messages
58
Location
Ottawa, ON, Canada
Im not sure if there is a solution to this or not, but I find that VB.NET executes slower than VB6!

Ive created a form (in both VB6 and VB.NET) with the following components:

- Two Text Fields (txtUsername and txtPassword)
- Two Labels (lblUsername and lblPassword)
- One Label (lblCopyright)

The form also has its background property set to a GIF image (13kb).

Additionally, the text fields are not VB.NET native they are Infragistics UltraTextEditor fields with the "etched style" (but Ive compared the execution time with the standard VB.NET button control and noticed no change in speed).

The BackColor property is set to 0 - Transparent on all labels.

When I run this form from VB6 the screen pops up without any delays, however, when I run this form from VB.NET the screen "paints" on and displays in about 1.5 seconds.

Is there something I should be doing to make this form "load" faster?

TIA!
M.
 
It may be the way VB.NET is debugged, compared to VB6.
Every time you debug the application, it has to compile into an
exe, attatch a debugger to it, then run it.

Is this the slowdown youre talking about, when the app is being
compiled? Or is it after the form is shown?
 
Hi Bucky,

The delay is the actual display of the screen (post-compilation). The form loads and displays instantaneously when compiled under VB6, however, in VB.NET the form loads and the controls seem to paint themselves on the form one by one.

It starts out as a blackened area where the control is to be displayed and then the control appears to be filled in.

It takes about 1 second or so for it to appear in full.

I know its not really a bug or anything, its purely aesthetic, but it drives me crazy! LOL ... At first I thought it was because Im learning .NET and maybe I forgot to code something, but it seems that no matter what I do it still has this "painted" effect.

Thanks!
M.
 
Is that Infragistics control an ActiveX control or Windows Forms Control?
 
Yep ... Ive created a shortcut to it from my desktop ... Ive done some more testing and it seems that depending on the controls I use the form is faster ...

If I use a transparent label in conjunction with the Infragistics UltraTextBox .. it paints slow .. if I force the colour of the labels and use regular textboxes its a tad bit faster .. but still nowhere near as fast as VB6 ...

Maybe I should just look for a really good calendar control for VB6, but I was really hoping to use the new Janus Schedule Component ... it looks really slick and is EXACTLY what I need (as far as functionality) ...

But I really like VB.NET, it has lots of cool new features ...

BTW - Thanks everyone for your help .. its much appreciated!!!

M.
 
Back
Top