469,607 Members | 2,075 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,607 developers. It's quick & easy.

VB .NET Form Question

When I add controls to a form and run the .exe under Win XP, the outline of the form displays first and then the controls on the form. The .exe works fine but the initial show looks like the computer is running slow because the form does not show all at once. It shows one control at a time. Yes, I do have functions in the form_load event but even if I remove these functions, the same slow looking show occurs. This did not occur in VB6 unless the PC was running very slow. Is this characteristic of VB .NET? Is there a way to force the form to display all at once? Thanks very much for your help.
Marc
Jul 21 '05 #1
4 3344
Hi Marc,

Normaly is the form painted after the load event, so show some code you have
in that?

Cor
When I add controls to a form and run the .exe under Win XP, the outline of the form displays first and then the controls on the form. The .exe
works fine but the initial show looks like the computer is running slow
because the form does not show all at once. It shows one control at a time.
Yes, I do have functions in the form_load event but even if I remove these
functions, the same slow looking show occurs. This did not occur in VB6
unless the PC was running very slow. Is this characteristic of VB .NET? Is
there a way to force the form to display all at once? Thanks very much for
your help. Marc

Jul 21 '05 #2
Hi Marc,

Normaly is the form painted after the load event, so show some code you have
in that?

Cor
When I add controls to a form and run the .exe under Win XP, the outline of the form displays first and then the controls on the form. The .exe
works fine but the initial show looks like the computer is running slow
because the form does not show all at once. It shows one control at a time.
Yes, I do have functions in the form_load event but even if I remove these
functions, the same slow looking show occurs. This did not occur in VB6
unless the PC was running very slow. Is this characteristic of VB .NET? Is
there a way to force the form to display all at once? Thanks very much for
your help. Marc

Jul 21 '05 #3
Hi Marc,

Dit you have that code as well in your VB6 application where you wrote about
that it was not so slow?

Cor
Here is the code in the form's paint event:
Dim DrawPen1 As New Pen(Color.Black, 4)
e.Graphics.DrawLine(DrawPen1, 0, 54, 400, 54)
e.Graphics.DrawLine(DrawPen1, 0, 84, 400, 84)
e.Graphics.DrawLine(DrawPen1, 0, 232, 400, 232)
e.Graphics.DrawLine(DrawPen1, 0, InitialFormHeight - 34, 400, InitialFormHeight - 34)
Hi Marc,

Normaly is the form painted after the load event, so show some code you have in that?

Cor
When I add controls to a form and run the .exe under Win XP, the
outline of the form displays first and then the controls on the form. The .exe
works fine but the initial show looks like the computer is running slow
because the form does not show all at once. It shows one control at a time. Yes, I do have functions in the form_load event but even if I remove these functions, the same slow looking show occurs. This did not occur in VB6
unless the PC was running very slow. Is this characteristic of VB .NET? Is there a way to force the form to display all at once? Thanks very much for your help.
Marc


Jul 21 '05 #4
Hi Marc,

Before I reinvent the wheel, there was a short while ago a discussion about
this in the newsgroup

microsoft.public.dotnet.languages.vb

http://www.google.com/gr************...TNGP11.phx.gbl
In my opinion a better newsgroup for question like this than this general
one.

So maybe next time you can ask this question better there.

Cor
No, I used the VB6 line control. I have not found an equivalent control in .NET. I removed the Paint code and the form loads a lot faster. I did
not think using Paint would slow down the display. Is there any alternative
to using paint to add a line? Thanks for your help.

"Cor Ligthert" wrote:
Hi Marc,

Dit you have that code as well in your VB6 application where you wrote about that it was not so slow?

Cor
Here is the code in the form's paint event:
Dim DrawPen1 As New Pen(Color.Black, 4)
e.Graphics.DrawLine(DrawPen1, 0, 54, 400, 54)
e.Graphics.DrawLine(DrawPen1, 0, 84, 400, 84)
e.Graphics.DrawLine(DrawPen1, 0, 232, 400, 232)
e.Graphics.DrawLine(DrawPen1, 0, InitialFormHeight - 34, 400,

InitialFormHeight - 34)

> Hi Marc,
>
> Normaly is the form painted after the load event, so show some code you
have
> in that?
>
> Cor
>
> > When I add controls to a form and run the .exe under Win XP, the

outline
> of the form displays first and then the controls on the form. The
..exe > works fine but the initial show looks like the computer is running slow > because the form does not show all at once. It shows one control at a time.
> Yes, I do have functions in the form_load event but even if I remove

these
> functions, the same slow looking show occurs. This did not occur in
VB6 > unless the PC was running very slow. Is this characteristic of VB

..NET? Is
> there a way to force the form to display all at once? Thanks very
much for
> your help.
> > Marc
>
>
>


Jul 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by Philippe C. Martin | last post: by
11 posts views Thread by Jozef | last post: by
15 posts views Thread by http://www.visual-basic-data-mining.net/forum | last post: by
27 posts views Thread by Chris | last post: by
26 posts views Thread by Jerim79 | last post: by
6 posts views Thread by Greg Strong | last post: by
6 posts views Thread by smk17 | last post: by
reply views Thread by guiromero | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.