473,378 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Form inheritance problem

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
Jan 11 '07 #1
6 1058
Later I change the button's image, but the child form cannot refresh

While running or in the designer?

Thanks,

Seth Rowe
Benson wrote:
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
Jan 11 '07 #2
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.

"rowe_newsgroups" <ro********@yahoo.com>
???????:11**********************@k58g2000hse.googl egroups.com...
Later I change the button's image, but the child form cannot refresh

While running or in the designer?

Thanks,

Seth Rowe
Benson wrote:
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

Jan 11 '07 #3
Did you rebuild the project?

"Benson" <be*******@yahoo.com.hkwrote in message
news:O4**************@TK2MSFTNGP03.phx.gbl...
>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

Jan 11 '07 #4
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
Benson Wong wrote:
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.

"rowe_newsgroups" <ro********@yahoo.com>
???????:11**********************@k58g2000hse.googl egroups.com...
Later I change the button's image, but the child form cannot refresh
While running or in the designer?

Thanks,

Seth Rowe
Benson wrote:
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
Jan 11 '07 #5
Benson Wong wrote:
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.
Jan 11 '07 #6
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.

"Phill W." <p-.-a-.-w-a-r-d@o-p-e-n-.-a-c-.-u-k>
???????:eo**********@south.jnrs.ja.net...
Benson Wong wrote:
>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.

Jan 12 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Hemraj Julha | last post by:
Hi (Sorry if this appears twice but I posted this yersterday and I can't see it in the forum today) I'm trying "Visual Inheritance" in C# and facing an issue which might be related to my...
1
by: Hemraj Julha | last post by:
Hi I'm trying "Visual Inheritance" in C# and facing an issue which might be related to my ignorance about namespaces and location of the source code within the folders so I'll try to explain my...
0
by: Frnak McKenney | last post by:
I'm running into problems with VisualStudio.NET2003 and Windows Forms inheritance. It _feels_ like a bug, but it could just as well be a misunderstanding on my part regarding how the VS Designer...
4
by: Alan T | last post by:
How do I create a form inherited from an existing form in the same project ?
7
by: ademirzanetti | last post by:
Hi there !!! I would like to listen your opinions about inherit from a STL class like list. For example, do you think it is a good approach if I inherit from list to create something like...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.