inherited form name changes

Stonkie

Well-known member
Joined
Sep 12, 2007
Messages
279
Programming Experience
1-3
I got a very strange issue with VS 2005. Here's how to reproduce it :

Create a form like this :

VB.NET:
Public Class Form1
    Public AssociatedForm As Form1 = Me
End Class

Then create an inherited form from it. In the designer, the "(Name)" property will change to "AssociatedForm" and every now and then it will rename your inherited form class to "AssociatedForm".

It seems like putting the assignation "AssociatedForm = me" in the "OnLoad" event solves the problem (putting it in the constructor doesn't change anything), so I could repair the random renaming and live to fight another day!

I wanted to know if this is a known issue and where I should report the bug (unless some wise men can tell me this is the expected behavior :confused:).
 
Back
Top