Windows Forms window not showing up properly!!!!!!!!!!

A

alex77ander77

All,

I'm pulling my hair out trying to figure out why my Windows Form is
not appearing correctly.

Basically, I have form A that tries to Show() an existent Non-visible
Form B. Basically there is an event on Form A that is supposed to make
Form B popup.

However, when the event triggers and form A wants Form B to appear, I
only get half of the window showing up? 8 text boxes are visible but
the 8 labels are transparent (I can see the Form A window below the
Form B that popup up.

What could cause this problem to occur??

Much appreciated because my deadline is Fri 10am!!!!!!
 
A

alex77ander77

All,

I'm pulling my hair out trying to figure out why my Windows Form is
not appearing correctly.

Basically, I have form A that tries to Show() an existent Non-visible
Form B. Basically there is an event on Form A that is supposed to make
Form B popup.

However, when the event triggers and form A wants Form B to appear, I
only get half of the window showing up? 8 text boxes are visible but
the 8 labels are transparent (I can see the Form A window below the
Form B that popup up.

What could cause this problem to occur??

Much appreciated because my deadline is Fri 10am!!!!!!

Here is an update on the faulty form. When I try and popup Form B, all
labels AND textboxes seem transparent and the Form just stalls.
 
P

Peter Duniho

[...]
However, when the event triggers and form A wants Form B to appear, I
only get half of the window showing up? 8 text boxes are visible but
the 8 labels are transparent (I can see the Form A window below the
Form B that popup up.

What could cause this problem to occur??

Much appreciated because my deadline is Fri 10am!!!!!!

Here is an update on the faulty form. When I try and popup Form B, all
labels AND textboxes seem transparent and the Form just stalls.

You haven't really posted enough information for anyone to definitively
provide an answer. However, the behavior that you have described sounds
very much like what happens when you create part or all of a form on a
thread without a message pump. It seems likely that the event you're
responding to was raised on a different thread than your main thread.

All of your GUI code should be executing on the same thread, the main
thread that called Application.Run(). Use Control.Invoke() to call any of
the control/form code.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top