I am using Visual Studio Express 2013 to create desktop applications (c# WPF and forms) on Windows 7 Pro. I have read that Paint will create icon files (as I understand they are some kind of bitmap but with an ico extension). When I start with an existing and usable icon, change it in paint and save it I can no longer use it for the icon in my applications. Has anyone actually been able to do this? I've read several posts with conflicting information but it seems that it may be possible. I think that the normal paid version of VS will make this easier, but I'm an architect (buildings) not a software developer so not likely to spend money to get that functionality.
If you include your icon file as a file in your project (Add Existing Item...), you can then right click on it, and select Open.
This will open an icon editor inside VS. An toolbar will appear that will have all the tools that you want to help edit your file.
You can do the same thing with just about any type of image.
Related
I'm starting with the Head First C# book and right off the bat I can't get my screen to look like how it looks in the book. It wants me to open Visual Studio, create a new Windows Forms Application and the picture they have shows Design View which has a blank form in the center and on the left, there's a Toolbox with bunch of windows form items to drag to the center, such as pointer, button, checkbox, label, listbox, etc. When I'm searching online how to get this Design View, everyone says select the form in the solution explorer and either right click and select Solution Designer or click Shift+F7. All this does is goes to the code in the center of the screen. How do I get to see the visual part of the form instead of just the code?
The .NET Core implementation of Windows Forms does not include a designer by default as it is still a preview feature.
The instructions to install the preview designer can be found here:
https://devblogs.microsoft.com/dotnet/introducing-net-core-windows-forms-designer-preview-1/
Alternatively, and more likely what you want to do is use the full .NET Framework for your Windows Forms application.
To do this, when creating the project in Visual Studio there will be a project type called 'Windows Forms App (.NET Framework)'
I had a similar issue. It turns out I was opening the Folder my program was in and not the Solution file. When I opened solution, it worked as expected.
EDIT: This is from right-clicking the .cs file in Solution Explorer. The Shift + F7 also doesn't work if you opened it as a folder rather than a solution.
I have recently created a windows form application.
I am wanting to compile everything together. All of the .dll files need to be compiled with the .exe file.
Not only am I wanting to compile all this but I am also wanting to create an installation for my application.
I have looked on other questions on here and couldn't seem to find the answer I was looking for.
If you are doing this in Visual Studio, you can open your project's Properties file in the Solution explorer. Click "Publish" on the bottom left. And then you will see a lot of stuff to choose from. Just explore the UI a bit. It's very user-friendly. Then find something called "Create Desktop Shortcut" and check that checkbox. You don't need this but it makes it easier to find your app after you install it. And then press "Publish Wizard" on the bottom right. Follow the instructions and BOOM!
You are done.
You can find the setup in the directory you specified earlier in the Publish Wizard.
If you are not using Visual Studio, INSTALL IT! It's beautiful (but big...)!
I am probably talking sh*t right now. If you don't understand, read this:
https://msdn.microsoft.com/en-us/library/31kztyey.aspx
I am using VS 2013 (Express Version) and I want to create a WPF user Control Library project. But I am not able to find the template in my installed templates list. If I use Winforms, I am able to build a DLL out of my Winforms Application Project just by changing the Output type as "Class Library". But it is not happening in WPF and it is throwing errors if I do so. Is this the correct method of doing it or am I going wrong?
And in the Create New Project dialogue window, I am not able to find the .NET Framework selector drop down. After creating the project only I am able to change the .NET framework version by going inside the properties of the project.
Kindly help me to get out of this. Thanks in advance.
I have been working on this exact same problem for hours this morning. Here is what I think I have learned:
With Visual Studio Express 2013, it is by design that the WPF User Control Library template is not available for making a New Project. This is because it is the free Express version.
With the Express version, you don't have a "devenv.exe" for trying the "devenv /installvstemplates" to "fix" things. It is, instead, called (just a moment while I look this up again...) "WDExpress.exe" and will be located (if you have default location) in the "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE" directory. BUT - this won't help you. It won't fix your problem, because, as I mentioned, your Express installation is designed to not have that template available for New Project, so your "fix" won't put it there. I know this because this is what I tried myself. (Also, note that the instructions for doing this tell you to uninstall any extensions you've installed before doing it. And then, of course, if you still want them you have to reinstall them. Like I still have to do, incidentally.) I'm letting you know all of this so you don't go through the headache I'm having.
Note that I have not done this yet, so this is somewhat hypothetical on my part, but is based on my research on the Internet so far - Your solution is to create a WPF User Control Library manually [but now see UPDATE below]. (No, I don't know how to do this yet. I got into this in the first place, because I'm a WPF novice - just started working with it a few days ago - and late last night I got this great idea to add a "spinner" progress indicator to my "WPF play/learning project" I'm working on, and found a couple of relatively easy-to-work-with samples on the Internet - both of them are a WPF User Control Library - and at first I wanted to use the copy-and-paste to put the code in. But then I discovered... well, our mutual problem, because I'm using Visual Studio Express 2013. No such template under New Project. And literally at the tail end of my about-to-throw-in-the-towel, I'm googling and your post, Dhivakar, is already showing up with the right Google search.) So I haven't finished my research yet, but my next step is to learn exactly how to create a WPF User Control Library manually (the code and various project property settings), and then I can just save a WPF User Control Library skeleton for future use and document the details.
UPDATE: This guy totally has the solution for Express versions. I have followed his steps and it works great. The only additional piece of information I would add is that in my version (VSE2013), after you've created your WPF User Control Library template, when you open Visual Studio again and use File -> New Project, my selection in the tree (for a Windows app) came up under Templates -> Visual C# -> Windows (which is what I've been using). I did not see my template showing up there, after I created it, and I thought, "Great! Another piece of advice that doesn't work." But then I clicked up one on the "Visual C#" parent - and there was the template!
Here you go:
How to add a WPF control library template to Visual C# Express 2008
https://dotupdate.wordpress.com/2007/12/05/how-to-add-a-wpf-control-library-template-to-visual-c-express-2008/
Yes, it works this way for VSE2013 too.
UPDATE 2: I'm not absolutely positive about this, but I think he missed one little piece. In his step #4 he says to delete Window1.xaml and App.xaml. Maybe this didn't apply with VSE 2008, but in VSE 2013 there is also the App.config file which I believe is extraneous for our purpose. So you can delete App.config as well. As I said, I'm not absolutely certain about this yet, but I noticed that file in the project when I added a WPF User Control Library project to my solution, and I deleted it, and the solution compiled okay.
Try running devenv with the /installvstemplates switch, from https://msdn.microsoft.com/en-us/library/vstudio/ms247116(v=vs.100).aspx
If this doesn't work, browse to C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ItemTemplatesCache\CSharp\WPF\1033\WPFUserControl (this could change dependent upon your installation directory), open the .vstemplate file in a text editor, and make sure the setting is set to true, then try running devenv with the switch again.
Hope it helps.
I've been making changes to a Windows Service in Visual Studio (2010, .NET 4.0 project) and when I go to close the solution or commit to TFS, Visual Studio prompts me to save a .psess file (MyService.psess) that I've never seen before and does not seem to exist yet (a file save dialog pops up prompting me for a location).
I can't find any documentation on this file. What is it? What might I have done to create it? Is it required?
These files generally contain performance profiling session data. You can view the Performance Explorer window to see if you have any open sessions using the menu View->Other Windows->Performance Explorer.
You can delete the sessions there also, if need be.
It's a Microsoft Visual Studio performance session file and contains information about a performance test session.
Where can I find standard (licence free) animations like "Copy" for self implemented windows applications (avi,animated gif)?
Visual Studio has only few animations in its image library (unfortunately not the "Copy" animation).
I'd recommend you download Resource Hacker and look for the desired resource in the C:\Windows\System32\shell32.dll file.
Look under the AVI section for the common AVIs used by windows.
Alternatively, if you have Visual Studio 2008 installed, look through the Visual Studio Image Library. There is a copy animation in there albeit it isn't the same as the one windows displays when a copy is in progress.
The VS image library can be found at %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\VS2008ImageLibrary
There are a few icon packs available through the Extension Manager in Visual Studio 2010, just search for "icon" in the Online Gallery. Not sure whether there are animated icons for the Copy operation, though.
On WindowsXP, some of the animations can be found in the shell32.dll, you'll need to grab each one and see what it is as they only have resource IDs for them. However, there is no documented API to access these resources and just opening shell32.dll and reading the resource is not recommended, nor can it be assumed what the format of the resource is, see this article by Raymond Chen about this issue.
Technically, you could just extract the animation using a resource editor and add the animation to your application. However, there is almost certainly a copyright / licensing issue here - copying the resources and adding them to your application is certainly copyright infringement, and reading the resource from system32.dll to use in your application might be breaking the EULA. IANAL, so seek advice if this is for a non-personal project.