Form inheritance problem

B

Benson

I build up a parent form and inherited to a child form.
Initially, parent form has a button with an image, so a child form has.
Later I change the button's image, but the child form cannot refresh (still
show the old image).

How to handle it?
Pls help

Benson
VS2005 pro, XP
 
R

rowe_newsgroups

Later I change the button's image, but the child form cannot refresh

While running or in the designer?

Thanks,

Seth Rowe
 
B

Benson Wong

I change the parent's button's image in designer. How can I refresh the
child's button's image?

I expect the child's button should show the parent's button's image. But no.
I suspect there is a bmp override in the child form. But I cannot find it.

Pls help.
Benson.
 
R

rowe_newsgroups

I expect the child's button should show the parent's button's image.

Does it show the correct image at runtime?

If so, close the child form's designer and then reopen it via solution
explorer. This forces the designer to refresh itself.

Thanks,

Seth Rowe
 
P

Phill W.

Benson said:
I change the parent's button's image in designer. How can I refresh the
child's button's image?

I expect the child's button should show the parent's button's image. But no.
I suspect there is a bmp override in the child form. But I cannot find it.

Look in the .designer.vb file for the child form.
Is there anything in there that sets the button's image?

If so, try removing it and rebuilding the project.

However, even if this works once, I strongly suspect that, if you make
any other change to the Form, the Image property will be saved in the
generated code again (if '2005 is anything like '2003!).

HTH,
Phill W.
 
B

Benson

There is no such button definition in the child form as expected. I try to
rebuild the project, and then open the child form. I found the button's
image is the same as the parent's in the design time, but different in the
run time (after execute the program). Does the resource bmp stored or coded
somewhere in the child form?

Any more hints.
Benson.
 

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