VB2005: Controls not appearing on form

T

TyBreaker

I have a form where when you click on a button a new form appears.
However the controls on the new form appear as blanked out regions on
the form until I click on them and suddenly they appear. I haven't seen
this before but am a bit of a newbie with VB 2005 so does anybody know
why this is happening?
--
______ ___ __
/_ __/_ __/ _ )_______ ___ _/ /_____ ____
/ / / // / _ / __/ -_) _ `/ '_/ -_) __/
/_/ \_, /____/_/ \__/\_,_/_/\_\\__/_/
/___/

There are 10 types of people in this world; those who understand the
binary numbering system and those who don't.

There's no place like 127.0.0.1.

ASCII a silly question, get a silly ANSI.
 
H

Herfried K. Wagner [MVP]

TyBreaker said:
I have a form where when you click on a button a new form appears.
However the controls on the new form appear as blanked out regions on
the form until I click on them and suddenly they appear. I haven't seen
this before but am a bit of a newbie with VB 2005 so does anybody know
why this is happening?

Which code are you using to show the form?
 
T

TyBreaker

Herfried said:
Which code are you using to show the form?

newForm.Show

The form does appear but just not rendered properly. I've been hunting
through the properties of the form to see if there's anything set that
might be related but I haven't had any luck.

Not sure if it is related but my main form is an appbar and when you
click on one of the buttons on the appbar, the new form appears. Is the
fact that the main form is an appbar causing this oddity in the child
form? I did have to use APIs to make the appbar function properly so
perhaps it's affecting the other form?

--
______ ___ __
/_ __/_ __/ _ )_______ ___ _/ /_____ ____
/ / / // / _ / __/ -_) _ `/ '_/ -_) __/
/_/ \_, /____/_/ \__/\_,_/_/\_\\__/_/
/___/

There are 10 types of people in this world; those who understand the
binary numbering system and those who don't.

There's no place like 127.0.0.1.

ASCII a silly question, get a silly ANSI.
 
T

TyBreaker

TyBreaker said:
I have a form where when you click on a button a new form appears.
However the controls on the new form appear as blanked out regions on
the form until I click on them and suddenly they appear. I haven't seen
this before but am a bit of a newbie with VB 2005 so does anybody know
why this is happening?

Well I finally figured this out although can't say I understand why. My
main form was set to TopMost whereas the spawned form was not. For some
reason this caused the controls within the spawned form to appear
transparent on initial rendering. If you clicked on them or simply
moved the spawned form, they then appeared correctly. Bug? Who cares,
it's fixed now.

--
______ ___ __
/_ __/_ __/ _ )_______ ___ _/ /_____ ____
/ / / // / _ / __/ -_) _ `/ '_/ -_) __/
/_/ \_, /____/_/ \__/\_,_/_/\_\\__/_/
/___/

There are 10 types of people in this world; those who understand the
binary numbering system and those who don't.

There's no place like 127.0.0.1.

ASCII a silly question, get a silly ANSI.
 

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

Similar Threads

Form Layout 3
Double-Buffering in VB2005? 1
System Icons? 2
Floating Menu Bar 6
Prompting for an IP address 4
MouseMove event not firing 3
Disposing - when? 1
Dynamic buttons 2

Top