First time user of Visual Studio 2005...need help DESPARATELY
Detailed assistance required Please....I have a deadline for this project....and already facing hurdles
can't help you if you don't help us help you. At the very least,
tell us what error you are getting when you try to open the form in the
designer. Oh, and tell your boss that it is going to take a bit
longer than anticipated, switching from VB6 to VB.NET is rough going.
Within the solution explorer, right click on Form1.vb (or whatever your form is called). The context menu should offer "View Code" and "View Designer" as two of the choices. Click on View Designer. If you still get the code editor (or if you aren't even offered the View Designer choice) my guess would be that somehow your file (or files) are not recognised as describing a form or other entity with a designer.
At the top of the Solution Explorer there should be a row of buttons. The second from the left should be "Show All Files". Click on that and the S.E. should now show the hidden files behind your form - Form1.designer.vb and Form1.resx. Be very careful if you choose to change this file in any way. The contents of these files are parsed by the designer and any deviation from what is expected might be enough to confuse the designer - causing exactly the kind of problem you are having.
The start of the Form1.designer.vb file should look like this...
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _ Partial Class Form1Inherits System.Windows.Forms.Form |
If it does then Form1 should be recognised as being of type Form and so capable of being viewed with a designer. However, the rest of the contents of that file may make it impossible for the designer to actually display the form. We can't really tell you what the contents should look like because that will depend on which controls you've drawn on the form. You could make a new project with a new form and some sample controls and then compare that form's designer file with your broken one to see if anything obvious jumps out. But there's no guarantee you'll find anything or fix the problem.
Depending on how much time and effort you have invested in this unviewable Form it might be easier and quicker to just start over with a new form or even a new Project?
Thanx for that support, though am afraid it didn't work and here's why:
I did realise that when I right clicked on my Form1 in the S E, the context menu offered only "View Code" and "View class Diagram" there was no "View Designer"
I also notice that the start of Form1.designer.vb file looks like :
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class DataEntry
Inherits System.Windows.Forms.Form
instead of :
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
Inherits System.Windows.Forms.Form
I did notice that my partial class is DataEntry and yet my file is Form1.designer.vb....could this be the problem of some sort?
Ps. I'm going to try and change it and see what happens...if it doesn't work, I might as well start afresh.
When you view all files, your form is made up of three files.
You have the designer interface ie. Form1.vb with its code behind file called
Public Class Form1
a system generated designer file ie. Form1.Designer.vb with its code behind file called
<
Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _Partial
Class Form1and a resx file Form1.resx
You shouldn't really change the hidden files, thats why they are hidden. The only time you should change this file directly is if an error shows up in the error window and the designer cannot generate the design view (and you should get an error page displayed.)
Linyantilo wrote:
I did notice that my partial class is DataEntry and yet my file is Form1.designer.vb....could this be the problem of some sort?
I tried a quick experiment and a mismatch between class name and the name of the containing file doesn't seem to upset the designer. This mismatch might be a clue to your actual problem but on the othr hand it might be a red herring. Starting over is probably quicker than continuing this battle.