Dan's Workshop
The Sinister Ginger
Home
Hockey Pools
PicasaWeb Gallery
Windows Home Server
VS.NET Inheritance Bug
Friday, April 16, 2004
VS.NET Bug. I was asked to look into a problem last week involving some moving buttons in the designer. The problem was occurring in inherited forms where the parent form contained some protected, and anchored controls. When you resized the child form in the designer and build, Vs.Net would create some interesting locations and sizes, often time off the form entirely. These location and size values are set in the
InitializeComponent()
which makes things difficult.
So, after some searching and digging I found an interesting KB article,
that explains its a bug
.
However Microsoft's solutions are actually the causes in VS.NET 2003.
Basically there are a few options:
Once you have the controls have been moved, delete the offending locations and sizes from the
InitializeComponent()
and they will inherit their values from the parent again.
Create another size and location property and replace the erroneous values with these hard coded values after
InitializeComponent()
.
Change the protection level to Friend.
Obviously some of these solutions have their own problems, but the bug is fixed in the latest beta release of Whidbey so just bide your time for a bit.
.NET
Thursday, April 15, 2004 10:20:04 PM (Eastern Daylight Time, UTC-04:00)
Comments [1]
Trackback
Friday, May 07, 2004 12:41:27 AM (Eastern Daylight Time, UTC-04:00)
This is a riviting topic. I look forward to further information of this sort.
Jo Jo
|
notjohnAT NOSPAMjojo dot com
Name
E-mail
Home page
Remember Me
Comment (HTML not allowed)
Enter the code shown (prevents robots):
Live Comment Preview
© Copyright 2010 Dan Forsyth
|
|
| Page rendered at Sunday, August 01, 2010 6:51:26 AM (Eastern Daylight Time, UTC-04:00)
Recent Posts
Restoring to a smaller drive using WHS
New stuff
Microsoft Research Stitching Tool
DailyLit + Little Brother == Goodness
Dexter
Categories
.NET
All
Blog Maps
DasBlog
Dogs
Europe
Gadgets
General
Hockey
Photo Gallerys
Rants
Software
Sports
Travel
WHS
Blogroll
Lifehacker
Easily my favourite site
All Things Runham
Your one stop Runham shop
Objectsharp
Some good blogs
Sign In