I'm using Visual Studio 2013 and I created a windows form application. Everything was fine until just now. When I go into my project now I cannot find the Form1.cs [Design] tab which allows actual form designing with the rag and drop of object from the toolbox.
I checked the directory and I do have files and sub-directories, but being a C# beginner, I'm not too familiar with what files are needed.
So, could someone please show me how to get this back?
Thanks.
This is pretty vague. But if it isn't in your solution explorer, re add the files to the project.
Right Click on your project root -> New -> From Existing Item, navigate to said item and add it. (shortcut is Shift + Alt + A).
If it's just code right click on it and select "View Designer", if you still have trouble try posting a screenshot.
Related
I am getting error as
The name does not exist in the current path as in issue link Name does not exist in the current context
I have tried all options in the comments but still unable to find solution,
One comment their says to regenerate designer file by right clicking and selecting "Convert to Web Application" but am already using web application and on right click of it am not getting that option.
Attaching reference Image.
Any suggestions?
I'm a little late to the party here, but I have a solution (and it's as easy as you hoped):
The "Convert To Web Application" menu option was moved to the Project menu item across the top of the Visual Studio 2015 application.
First, delete the desired designer file.
Next, click on the ASPX page of the one you want to regenerate the designer for. If you click on the CS page, the option will not show up in the menu.
Click on Project from the top menus and you should see "Convert To Web Application" in the menu. It should be all the way at the bottom of that popup menu.
I m using visual studio 2012 and my problem is minor .. and that is whenever i create mvc4 web application it doesnot show solution explorer to add class library. only my project gets displayed.
If you are looking for the actual Solution Explorer window you can activate it by going to the View menu and clicking on Solution Explorer.
I was experiencing the same issue. In my case, it got resolved by following the below steps:
Click on Tools.
Click on "Import and Export settings".
Select "Reset all settings".
Click on "No Just reset my setting".
Click on next.
Click on finish.
I have a Project in which there is a form that has several objects (controls) in itself. I want to add this form to another Project in another Solution. How to I can do this. Thanks.
This is a good thing to reuse your code :)
You have to make a library project.
1)File => New Project
2)Check Visual project in the tree
then select "Class Library", give it a name "MyFormLib"
3)Then simply copy paste YourForm.cs and YourForm.designer from your app project, to "MyFormLib".
4)Now go to solution explorer, browse to your application project, right click on "references" then "add reference"
5)To finish click on "solution" then choose your library project "MyFormLib"
.
6)You can now use the form from the library project inside your application project.
e.g : new MyFormLib.TheForm()
7) To reuse your form in your second application, redo steps 4 to 6
Just simply open the project where you want to add the existing form:
Right click on the Solution Explorer
Select "Add" -> "Existing Item..."
Browse your other project's folder, and search for the 3 files of your form:
yourForm1.cs, yourForm1.Designer.cs, yourForm1.resx
The simplest way is to
Open the destination solution in Visual Studio.
On the Solution Explorer, right-click the destination Solution name and Click on Add > Existing Projects. Identify the project with your source Form.
Move the form from source to destination project (The designer and resx files will move with it)
Change relevant namespace specifications and then you may remove the old form.
Hi iam new to visiual studio, and for my studies i have one centered with c#.It is not a difficult questions
firstly wheneveri start a new project through file->NEW->projects all other projects in the document disapears. anyway to keep them?
secondly whenever without any problem when i start new projects the solution explorer shows its contexts without problem, but how do i show the contents of other projects opened aswell?
thanks in advance hope it is not vague.
By doing this "file->NEW->projects" you are opening a new solution if you don't
change the solution property to "Create new solution" to "Add to solution".
By selecting "Add to solution" you can add new project to you existing solution.
also you can right click the existing solution and add new project to it.
Right click on your solution and then click on Add. Then select Existing project and add your project into the solution. Then you will be able to see all the projects opened at the same time.
I'm trying to copy and past a form within a project using Visual Studio.
I've managed to copy and past the form (right clicking in the Solution explorer > Copy; Right click again paste) I can change the name of the new form in the Solution explorer. But when I select the form [Design] I can't change the name property without changing the name property in the original form. Somehow the two are linked. What am I doing wrong?
I hope this all makes sense.
Exclude all files of that form from project and then include again.
You can perform the include steps after reopen the project.