visual-studio-2010

Write the registry value without redirect in Wow6432Node

北城余情 提交于 2020-01-11 09:36:09
问题 this code insert the registry value Microsoft.Win32.RegistryKey key; key = Microsoft.Win32.Registry.LocalMachine.CreateSubKey("SOFTWARE\\Microsoft\\Internet Explorer\\MAIN\\FeatureControl\\FEATURE_BROWSER_EMULATION"); key.SetValue("MyBrowser.exe", 8000); textBox1.Text = key.GetValue("MyBrowser.exe").ToString(); key.Close(); in windows 32 bit work, but in 64 bit is inserted to wow6432node how to disable the redirect? 回答1: You need to open the key using RegistryView.Registry64. You specify this

How to zoom at a point in picturebox

寵の児 提交于 2020-01-11 09:28:29
问题 This is my code. I am able to zoom the picturebox but not at a point. How to zoom to a mouse point when i rotate the mouse wheel? The variables are:- private double m_dZoomscale = 1.0; //THIS IS THE ZOOM SCALE TO WHICH EACH OBJECT //ARE ZOOMED IN THE CANVAS public static double s_dScrollValue = .01; //scale factor value for mouse scroll zooming The paint code is:- private void m_Picturebox_Canvas_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; g.ScaleTransform((float)m

Visual Studio 2010: Easiest way to duplicate a class?

非 Y 不嫁゛ 提交于 2020-01-11 09:23:20
问题 Is there an easy way to duplicate a class with a different name? 回答1: Not sure whether this can be qualified as the easiest way but if you have ReSharper, you can use its Copy Type refactoring to copy classes/interfaces/structs with control over the namespace the copy is landing in and naming within the copy - which means that if you're copying a class with 5 constructors, the copy will have all of them renamed to match the name of the new class. However, depending on what you're trying to

alternative to visual studio 2010

冷暖自知 提交于 2020-01-11 09:13:24
问题 Is there any alternative to visual studio 2010 for develop with .net 4.0? thanks 回答1: Considering that .NET 4.0 only just came out (at the same time as VS 2010) I would hazard a guess at "No". :) In general, Visual Studio is by far the best IDE I've ever used. Nothing else even comes close. 回答2: You can use SharpDevelop to develop .NET projects, including .NET version 4.0. SharpDevelop 4.0 final has been released 06/2011. ( though the support for 4.0 is still in beta status AFAIK. ) 回答3:

alternative to visual studio 2010

久未见 提交于 2020-01-11 09:13:18
问题 Is there any alternative to visual studio 2010 for develop with .net 4.0? thanks 回答1: Considering that .NET 4.0 only just came out (at the same time as VS 2010) I would hazard a guess at "No". :) In general, Visual Studio is by far the best IDE I've ever used. Nothing else even comes close. 回答2: You can use SharpDevelop to develop .NET projects, including .NET version 4.0. SharpDevelop 4.0 final has been released 06/2011. ( though the support for 4.0 is still in beta status AFAIK. ) 回答3:

Visual C++ 10 lowercases the __FILE__ macro

。_饼干妹妹 提交于 2020-01-11 08:53:26
问题 The __FILE__ preprocessor macro in Visual C++ 10 expands to the name of the source module, but in lowercase, e.g. c:\path\to\my\file\somesource.cpp when the file name is actually SomeSource.cpp Is it possible to change this behaviour? 回答1: As suggested by Hans Passant, I asked the question on Microsoft Connect and got the following answer: Thanks for noting this. This behavior has existed for a while, at least back to VS 2008. Changing the default behavior could potentially be a breaking

Is there any way to export sequence diagram generated by visual studio?

给你一囗甜甜゛ 提交于 2020-01-11 08:15:27
问题 I am using Generate Sequence Diagram feature of Visual Studio. I have to show my sequence diagram to someone who don't have Visual Studio Ultimate Edition Is there any way to export the sequence diagram to any format so that it can be viewed outside Visual Studio? 回答1: This answer works in VS 2012: Open the sequence diagram select the whole diagram by CTRL+A copy it to the clipboard -> CTRL+C go to an open MS-Word document and hit CTRL+V to paste it the diagram is pasted and you can perform

I can't build multiple configuration(s) of a project at the same time in Visual Studio, but I can with MSBuild

最后都变了- 提交于 2020-01-11 07:20:13
问题 I want to build two configurations at the same time of a project. Let's say that when I want to build the release version, but I want to build even the debug version (the opposite isn't true). Starting with Use a single Visual Studio solution to build both x86 and x64 at the same time? I've tried adding to the .csproj: <Target Name="AfterBuild"> <MSBuild Condition=" '$(Configuration)' == 'Release' " Projects="$(MSBuildProjectFile)" Properties="Configuration=Debug" RunEachTargetSeparately=

Cannot reference dependency assemblies in T4 template when using TransformOnBuild

試著忘記壹切 提交于 2020-01-11 06:59:09
问题 We're trying to use T4 with Visual Studio 2010 (SP1) to build scripts for another language that are based upon some of our existing C# classes. I'm hoping for the following: The template needs to load our existing assembly and use objects from a namespace in that assembly. The transformation needs to run on every build on every development machine and build server without any additional installations. (1) and (2) need to work together. (1) was fairly straightforward: <#@ assembly name="$

What do I need to install a Visual Studio 2010 (sln)-compatible Build Agent in TeamCity?

纵饮孤独 提交于 2020-01-11 05:33:19
问题 I seem to be unable to install a build agent on our TeamCity 5.1.2 build server that is compatible with a VS2010 (sln) build configuration. Under "Build Runners", the following runners are listed: Ant: Runner for Ant build.xml files Duplicates finder (.NET): C# and VB duplicate code finder Command Line: Simple command execution And under "Compatible configurations", the project I've configured to build with the Visual Studio 2010 (sln) build runner is listed under "Incompatible configurations