I am following a video tutorial for a .NET application.
This is my first .NET application so I am very new to this.
I downloaded the tutorial project given in the video.
In the video, the tutor is able to view the form.designer.cs file visually and 'see' the actual UI and rearrange the buttons, drag and drop new objects etc.
For me it just shows the code view when I click on the form.designer.cs file. How can I shift to the drag-drop UI view?
I have a MAC OSx. Furthermore, in terms of file structure, I have a Form1.cs file and when I click on that in VS Studio, I get a down arrow with Form1.resx and Form1.Designer.cs file inside it.
Push Shift+F7, which is the shortcut to open the designer. You should also be able to access it using the Solution Explorer on the right-hand side of your VS environment.
Related
It is irritating (and counter-intuitive) that with the files for a Windows Forms application, *.cs is opened in the designer while *.Designer.cs is opened in the code view. I want to be able to change that as I have the following file structure
Root
|----Forms
|----MainWindow.cs
|----MainWindow.Designer.cs
|----MainWindow.Events.cs
|----MainWindow.resx
|----
|----
|
|----Program.cs
That is a simplified version but it shows what I am trying to explain. I want to be able to double-click on MainWindow.cs and MainWindow.Events.cs to open them in Code View but when I double-click on MainWindow.Designer.cs, I want it to open up in Designer View.
I can't find a solution so if there truly is no solution to this, I don't mind a botch/hack.
VS2012 Pro and TFS: This is a file that used to be under source control and even the icons next to it I think is showing that it is but when I make a change and right click the option for "Undo Pending Changes" is disabled. However other files in the same project are working fine.
Here is also a screen shot: The file with this issue is Service.asmx.cs
The red check mark next to the file indicates that it is under source control and is checked out. This file is generated from the Service.asmx file and to perform source control changes like "Undo pending changes" you will have to make this operation on the Service.asmx file. Whatever change you make will cascade to the generated file.
If you are in doubt about the source control status of a file you can locate it in Source Control Explorer where you can perform operations on individual files even though the files are linked in Visual Studio. However, unless you know what you are doing I highly recommend that you stay in Visual Studio when working with files that are linked like this.
Im going to the toolbox and doing right click then choose items then im going to the COM Components tab then browse and my file name wich in this case is LineGraph.dll I see this file on my hard disk I also did properties on the file and I see that the type is .DLL
But when im trying to load/open it in the toobox im getting error: LineGraph.tlb could not be loaded.
But the file is .dll where from this .tlb came ?
Working my mistake I tried to load it as COM Component instead of .Net so when I browsed for the file it was looking for tlb . Now it's working.
Tool Box > Mouse Right Click Button > Choose Items > .Net Framework Components
Wait some seconds until it will finish to load all the items then click on Browse on the right bottom corner select the .dll file and click ok.
I got here by clicking on a Button on my Form in the designer, going to the Properties window, finding the Image property, and hitting the ... button that appears to the right of the textbox.
If I open up the Properties\Resources.resx file in the designer, I see all the images in my project, yet I cannot view them in this list. I suppose I could import the images I want from a directory, but then I would have duplicates.
How can I select from images in the resource file from this dialog? How can I get them to appear? Thanks.
You should probably click the Import button first, and than add the images. This will add them to the resource folder. You should do this from visual studio, not via the explorer
I had the same problem but it was a simple answer. I have multiple projects in my solution, and consolidate my common resources in a separate assembly. The resources must be in the same project (assembly) in order to be accessed by the designer of whatever control you're using that wants to use the image. Otherwise you have to get the images at runtime.
I'm trying to add/change images in my project, using Microsoft Visual Studio 2008 C#. Along with it, Devexpress components are also included.
What I did, I copied an image (.png file) and paste it it in my "PrintRibbonControllerResources.resx" and then after that I have to open again the MainForm.cs right click on the form and click on the Run Designer. It will open the Ribbon Control Designer. From there, I can add the image.
Do you think its ok? It's my first time to do this, and I don't have any experience & I'm learning it by doing.
Thanks
===
it seems I don't see the add function under resource tab
I generally add an image to the project itself. (Add/Existing item) I do this so I can use SourceControl to check in/out the image file. The resx then links to these files.
Basically, my philosophy is: if it works, don't fix it.
If this solution works for you, it's fine. At least, until you discover a situation where it fails.
If you go in the properties of your project, and select the resources tab, you can add it directly from there and it will be accessible in the default resource file of your project, which might be more convenient.
I like to add it to a solution folder (or folder in the project) and like that to the resx via "Add Exising File".
I get all of the advantages of having the resource file, but also the advantages of having a physical file (editing, quick view, etc.)