I want to be able to edit an image (png file) from the resources folder of one of my projects in VS2008. But the resource editor in VS will only allow me to zoom in and out. As the images are 32 bit, VS also will not allow me to use the image editor toolbar to change this. I would like to know if anyone knows how i can edit the image via VS or an associated plugin that is safe to use with source control?!
Thanks in advance guys!
I'm unsure if VS has any built in image editing applications that meet your needs. However, for editing our image resources I've set it up so that the default application launched when selecting certain filetypes is Photoshop (or a different editor depending on the change required).
Changing the default opened program for a filetype can be done using the following steps:
http://msdn.microsoft.com/en-us/library/hy2sthf1.aspx
As for source control safety, I use AccuRev with the AccuBridge plug in for VS. So anytime any of the files under source control are modified it is noted as such. Then these files can be committed as required either through VS AccuBridge plug in or through the regular source control client.
I don't think the VS resource editor supports editing PNG files (see this related question).
I'm not sure what you mean by "safe to use with source control" -- any image editor should fit the bill. Check out the file, locking it if necessary, then edit it with your favorite image editor, such as GIMP. When you're done, check in.
Related
In Solution Explorer, Right click -> Add... Icon file.
The file gets created, but looking at it in Visual Studio, it is uneditable. It includes multiple mips. If you open in external editor, it opens paint. If you then make changes and save it, it asks to save it elsewhere and doesn't affect the original ico.
The thing is, I'm sure this has worked for me before. I'm just not sure what's happening now. Can anyone enlighten me?
The issue you're experiencing is that Visual Studio does NOT know how to edit PNG targets - even though it adds them to your ico by default.
You'll notice that if you have the image edit bar up, you can in-fact edit the BMP target ones (including pasting over from a more capable image editor 😀). Further oddness on visual studio's part, you don't appear to be able to add back the PNG targets, so if you delete them they're gone forever unless you have an external ICO editor (which I assume would mean you wouldn't be using the VS one anyway).
Your best bet if you're committed to continuing in VS (several free websites available that will do this for you given some images) is to clear out the unused versions, and add BMP targets for the sizes you care about. The max for BMP is 24 bit, so be aware, but you should be able to keep a fair amount of fidelity, and still keep your transparency (there is a transparent color, and if you paste in with transparency the editor will automatically fill that in for you) - all while keeping the same sizes as the PNG targets.
Hope that helps!
I remember once while using Microsoft Visual Studio, opening a source file (by accident I think) and having it render in either subdued colors or with a different background and showing a watermark indicating that this file was not a normal editable source file. I was under severe time pressure then and unfortunately can't recall the file or the wording of the watermark (or I would be able to investigate unaided).
Does this ring a bell with anybody? Is there a way to cause MVS to display auto-generated files in a different manner so that the developer does not waste time editing something that should not be edited? I open plenty of auto-generated files all the time (usually as a result of some global search) and it would be helpful to have all such files render in the editor this way.
The MVS version in question is Microsoft Visual Studio Professional 2015. I have Resharper and OzCode as well.
I was having this same problem. For the files I work with (web stuff, js, css, etc.) the watermark is applied by Web Compiler: "Shows a watermark when opening a generated file" (see features list in https://github.com/madskristensen/WebCompiler).
It turns out the "Generated" mark is toggled by clicking the bottom right corner of the editor window. In fact, it is always there, however if you accidentally click it, that will cause it to be hidden UNLESS you mouse over the bottom right corner of the editor window of the generated file.
So, to re-enable the watermark:
Open a file you know for sure is generated, like one of the output files in your compilerconfig.json file.
In the editor window, mouse over the bottom right corner of the window. You should see the "Generated" text re-appear, with a tooltip that says "Click to toggle visibility".
Click the text. From now on the "Generated" watermark will show up in your generated files. Just be sure not to accidentally click and hide it again.
-Michael
Background
I am working with VB6 legacy code and I am using an external editor because of the features that it has. Unfortunately, those changes aren't refreshed in the IDE because VB6 doesn't monitor loaded code for changes.
I have done some extensive searching on the subject including looking for alternative editors, a fairly exhaustive internet search including following all of the links on this StackExchange link and haven't found a way to refresh the code window to reflect the external file changes.
My company doesn't have access to the latest edition of Visual Studio and will not be purchasing it anytime in the near future. Until then, there is code to fix.
Question
Aside from restarting the program are there any methods that can be used to refresh the code displayed in the VB6 editing window?
Check out vbAdvance add on. It will prompt you to reload source file in case of external modification.
I think a found one possible solution.
The MZ-Tools set has an function called Reload file from Disk. It also allowed me to create a shortcut for this function through the MZ-Tools options menu, so I assigned it to the shortcut keys of my choosing.
It's a solution, but I'm still looking for anything that might be better.
I want to achieve that when the user installs the WP7 control library he will find it in the Visual Studio toolbox automatically without manually adding it. In addition I would like to organize toolbox tabs in a logical manner.
I know it can be done for other platforms. For example I tried writing *.design.dll as described here - it does not work for WP7.
Any pointers how to work with toolbox for VS 2010 / WP7?
Nobody answered, so here is my brief summary:
The control library cannot be added to the Toolbox automatically unless you program VS plugin (package). Too much work for me...
*.design.dll (see the link above) basically works.
2a) You can hide controls from the Toolbox (BrowsableAttribute) and you can define control icons. That's probably everything you can do for Toolbox. The user has to add Toolbox tabs and "choose items" manually.
Well, I am not quite sure here, because when you drop the control dll file onto the Toolbox, then at least ToolboxTabNameAttribute works, i.e. corresponding Toolbox tabs are created automatically. Unfortunately, the tab is empty.
Also, when the control library is properly installed, then some of the controls are added to Choose items Toolbox dialog. Unfortunately, in my case most of the controls are missing and have to be added by manual browsing.
2b) Designer support (Properties window for the control) is better. You can hide properties (BrowsableAttribute), define categories (CategoryAttribute) and define descriptions (DescriptionAttribute).
Descriptions can be extracted from you documentation xml file, so that you don't need to write them again. To get the code google for MetadataBase.cs. Just be carefull, the files you'll find contain fatal bugs (ParseDescription method) and ignore some properties (getters that return a collection).
After all, the result is not that bad.
How do I transfer the window layout in Visual Studio 2010 from design mode to debug mode? I have a window layout I am fairly happy with in design mode, and would prefer to not have to do all that work all over again just to change a few details in it.
I found some questions that were kinda-sorta about this, but not quite.
Any suggestions? I know about import/export settings and use it religiously (switching between single-monitor and dual-monitor window layouts) but that doesn't really help me in this particular situation, as far as I can tell.
VS shell's ViewManager serializes the window profiles in your %AppData%\Microsoft\VisualStudio\10.0 directory in *.winprf files (which are basically just XAML files).
There are 5 profiles: Debug, Debug-Fullscreen, Design, Design-Fullscreen and NoToolWin (when no solution is open). You can experiment with replacing your Debug*.winprf with your Design*.winprf.
Please note that any manual modification of these files is entirely unsupported, so if you break something, you're totally on your own here.
Export your settings:
Choose General Settings/Window Layouts (in VS 2013) and save the file.
Open the file in an XML editor (or whatever... it's an XML file)
Find /UserSettings/Category/Design/WindowProfile and copy the entire node.
-- This assumes your Design view is the one you want to use for both modes.
Find /UserSettings/Category/Debug/WindowProfile and replace it with the one you copied from Design.
Save and re-import.
I have one of these settings files for home, remote, and office.