I have noticed from time to time when working in the Windows Forms designer that clicking back and forth between the designer pane and the properties grid can cause Visual Studio to think you double-clicked on a design item, and therefore create an event handler and switch to the code view. It is certainly annoying. I have recently found a way to prevent this.
When working in the property grid, press Enter after inputting or changing a value. Now when you click back to the designer, Visual Studio won't go all goofy on you.
Hope this helps
About Steve
Steve Andrews has been working as a developer for more than 8 years. During this time, he has designed and developed applications in such widely varying areas as trust accounting, medical information management, supply chain management, and retail systems.
He has firsthand developer experience with a variety of languages, including Java, VB, and .NET. Most recently, he has been immersed in SharePoint.
He is currently employed at RDA Corporation in Philadelphia, PA, as a Software Engineer and a team member in the Architectural Guidance evangelism team.
Steve is also an MTCS (x2), ICSOO, and .NET fanatic.