visual-studio-2008

Mouse cursor bitmap

Hi, i am trying to get bitmap from mouse cursor, but with next code, i just can't get colors. Please a little help... Thanks in advance :) CURSORINFO cursorInfo = { 0 }; cursorInfo.cbSize = sizeof(cursorInfo); if (GetCursorInfo(&cursorInfo)) { ICONINFO ii = {0}; int p = GetIconInfo(cursorInfo.hCursor, &ii); // get scree...

Intellisense doesn't work in one CPP file only

I've a weird situation in VC++ 2008 (unmanaged regular C++), where one source file has no intellisense at all... no tooltips when hovering over vars, no autocomplete, nothing. But the rest of the source is working fine and this file isn't anything special. I deleted the NCB file when things were a bit broken elsewhere and it all started ...

Performance of C++ applications in VS2010 and VS2008

I'm working on a real-time application (lets call it App1) which is communicating with another application (App2). I used VS2008 and both applications are in C++. Recently I converted the App1 project to VS2010 and right after that it started crashing (I use VS2010 Premium Ver. 10.0.30319.1). Crash dump shows that right before a crash, A...

Can ClickOnce be configured to delete off old published directories?

Can ClickOnce be configured to delete off old published directories? Or Has anyone written some code that will delete off these publish directories (maybe keeping the last 10)? Currently, every time a ClickOnce Publish is done a new directory is being created on the IIS Server. This NEW directory contains a copy of the whole applicat...

C# question on what this code means

I am learning c# code from one of the applications that I run SQL queries from. I am wondering what the following code does in layman's terms: return typeof(ViewModelBase<T>).GetProperty(propertyName) != null; This is in a function that returns a boolean and a string is passed into it. ViewModelBase<T> is an abstract class. Can s...

interesting error: new form has black line across it, how do I get rid of it

Hi, I was creating a new form and my IDE crashed, or it was having problems, and now every time I create a new form it has a black line across it. The black line is not something I was adding, it appears to be the black line from the top of the form getting painted in the wrong place. The interesting thing is that every time I reload ...

Really disable XML Schema Explorer

The first time you open up an XML file in a Visual Studio 2008 SP1 instance, it opens up XML schema explorer. I want to disable it. Is this possible? Background: I'm developing within a VMware environment (yes, I agree, that is the real problem here). XML Schema Explorer uses graphics acceleration, and this messes up the VM (it drops ou...

Can Resharper (or Visual Studio) collapse a method call (replace the call with the contents of that method/constant)?

I've inherited a web application written in ASP.NET that has an incomplete implementation of a localization scheme (not using resource files). Here's a micro version: public class Useful { public void DoSomething() { return Localizations.Do_Something_Message_vx7Hds8i; } } public class Localizations { public cons...

Can VC++ 2008/2010 be easily used on the same code?

I really would like to use 2010 if only since they appear to have fixed intellisense, but everyone else on the project don't have it (nor do I, yet). Is there any particular difficulty upgrading a C++ solution? Any other issues apart from having to remember to update both 2k8 and 2k10 project files with new source files? ...

Resizing the datagrid proportional with the form size

hii I am a fresher in the c # so i want to know how to resize the datagrid(any other control)aith respect to the form size. I just added one datagrid in the form then what i have to do?please help me...from the very basic please ...

How Can I export the list of classes from a Visual studio 2008 solution.

Is there any easy way to get the list of classes from VS.Net 2008 to a text file or an excel sheet. I just want to make a list of classes that I have in a solution. Thanks in Advance, ...

Adding WCF service reference with additional DLL breaks

I have the following classes defined in an external assembly from a third-party vendor: namespace ThirdParty.Vendor.Code { [Serializable] [XmlInclude(typeof(Test1Data))] [XmlRoot(Namespace = "", IsNullable = false)] public abstract class DeviceTestData { protected DeviceTestData(); } [Serializable] [XmlRoot(Namespac...

VsInstr performance profiling

I have a problem with building performance profile for my .net web app See my steps below: Setup global variables VSPerfCLREnv /traceon VSPerfCLREnv /globaltranceon Instrument assemblies vsinstr "path to my assembly" Restart iis iisreset Start profiling VSPerfCmd /start:trace /output:traceoutput.vsp...

Is there a way to create warnings when building (but more importantly publishing) a project in VS 2008?

I have a project which uses a system to authorise users. While I make some updates I want to to be able to set IsAdmin(username) to always return true. I wont forget to remove this, however it would be helpful if there was functionality in visual studio, like the //TODO, which created a warning or on build or publishing. Does anyone k...

I've tried EVERYTHING! How can I stop: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

So I'm trying to make a simple C# console app that simply queries a database - nothing more. However, I keep getting this error: An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll Additional information: A network-related or instance-specific error occurred while establishing...

How to Use PDB file to debug the application?

I've created a simple winform project, added ClassLibrary with a single method that triggers IndexOutOfRangeException. The form call this library and displays unhanded exception. I build everything in Release mode with pdb files When I run the Exe I get the error reporting window with error info. What now? how do I use PDB file with ...

Accessing data between user controls

Hi, I am a beginner for Visual Studio C# 2008. Currently, I am creating the program which requires me to have user input in one User Control item and this data is needed to be passed on to another User Control for arithmetic manipulation. My first User Control is called Structure_Data. I will be getting input values from the textboxes n...

why when I changed one of the my ComboBox.enable both of my ComboBox.Enable chenaged?

Hi.I have two tabpage and two combobox (C#). combobox1 in tabpage1 and combobox2 in tabpage2. when I use this code "combobox1.enable=false;" both of my combobox.enable get false.but I need to disable just one of them. another question:when I change combobox1.text both of them change.why? ...

Access Denied when calling PrintQueue.Pause() method in C#.net

I'm trying to pause a windows 7 print queue using C#.NET visual studio 2008. I have full administrator rights but when I run the following code to Pause the Queue it says Access is Denied. Please help me. LocalPrintServer lps = new LocalPrintServer(PrintSystemDesiredAccess.AdministrateServer); //PrintServer lps = new Pri...

Visual Studio 2008 search and replace regex

I have a large solution with a lot of lines that I need to replace. In Visual Studio, you can search and replace with the aid of regular expressions. I want to replace lines like: rst.Fields("CustomerName").Value rst.Fields("Address").Value rst.Fields("Invoice").Value To: row("CustomerName").ToString() row("Address").ToString() row(...