The Software Development Kit WinTalk sample cannot be opened in Design view in Visual Studio .NET (834062)
The information in this article applies to:
- Microsoft Visual Studio .NET (2003), Professional Edition
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2003), Academic Edition
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2002), Academic Edition
- Microsoft Visual Basic .NET (2003)
- Microsoft Visual Basic .NET (2002)
- Microsoft Visual C# .NET (2003)
- Microsoft Visual C# .NET (2002)
SYMPTOMSWinTalk is a Microsoft Visual Studio .NET Software
Development Kit (SDK) sample. When you try to open the WinTalk sample in Design view in Visual Studio .NET, you may receive the following error
message: An error occured while loading the
document. Fix the error, and try loading the document again. The error message
follows:
The class TalkForm can be designed, but is not the first
class in the file. Visual studio requires that designers use the first class in
the file. Move the class code so that it is the first class in the file and try
loading the designer again. Note In this error message, the word "occured" is misspelled with one "r". CAUSETo design the form, the Design view of the form uses the
first class that is in the Code view of the form. If the TalkForm class that is used to design the form is not at the beginning of
the Code view of the form, you may receive the error message that is mentioned in the "Symptoms" section.WORKAROUNDTo work around this problem, follow these steps:
- Locate the WinTalk folder. Open a Visual Basic
.NET project in the WinTalk folder.
- In Microsoft Solution Explorer, click the
WinTalk.vb file.
- On the View menu, click
Code.
The Code view of the form appears.
Note The Code view of the form has three classes. The three classes
are:
- The App class
- The TalkForm class
- The Talker class
The TalkForm class inherits from the Form class. - Locate the following code in the WinTalk.vb file:
Imports Microsoft.VisualBasic - Move the code that corresponds to the TalkForm class and
then put that code below the code that you located in the step 4.
The
WinTalk form Designer view opens without error.
REFERENCESFor additional information about the custom design-time
control features in Visual Studio .NET, visit the following Microsoft Developer
Network (MSDN) Web site: For additional information about building Windows forms controls
and components with rich design-time features, visit the following MSDN Web
site:
Modification Type: | Minor | Last Reviewed: | 2/9/2006 |
---|
Keywords: | kbvs2005swept kbvs2005doesnotapply kbWindowsForms kbDesigner kbprb KB834062 kbAudDeveloper |
---|
|