visual-studio

Copying C++ API header files to a common directory

Hi all, I have a Visual Studio 2008 solution comprised of several projects. Only some header files in each project represents API to the library built from the project. Is there a way in Visual Studio to copy the files to a common directory prior compilation? (I want to do it in order prevent including unintentionally header file I'm n...

VB.NET Lambda Expressions

If I have Visual Studio 2008 and I target a .NET 2.0 application, can I still use Lambda Expressions? My understanding of Lambda Expressios is that its a feature built into the compiler, not the framework, so my conclusion would be that I could use Lambda in .NET 2.0 application. Can someone please tell me if this is so? ...

Is it safe to remove the namespace definition from a new class in visual studio?

When you create a new class in visual studio it includes a namespace definition which is pulled from the default namespace set in the project properties. However if you remove the namespace definition it picks up the default namespace anyway. Is it safe to remove and is there any benefit to leaving it there? ...

How is performance affected by an unused using statement

Visual Studio will automatically create using statements for you whenever you create a new page or project. Some of these you will never use. Visual Studio has the useful feature to "remove unused usings". I wonder if there is any negative effect on program performance if the using statements which are never accessed, remain mentioned ...

Accessing listbox members seems to kick me out of my function in C#

Using VC# 2008, in WinXP 32 bit, the following function private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { textBoxURL.Text = webBrowser1.Url.ToString(); if (bStart) { string strData= webBrowser1.DocumentText; int iIndex = listBox1.Items...

Compiling MySQL custom engine in Visual Studio 2008

I have compilation errors while compiling MySQL sample of storage engine from MySQL 5.1.36 sources. Looks to me that I set all paths to include subdirectories but that seems not enough. Here are the errors: 1>c:\users\roman\desktop\mysql-5.1.36\sql\field.h(1455) : error C2065: 'FRM_VER' : undeclared identifier 1>c:\users\roman\...

Create header file from COM TLB

Given a managed COM object and an associated tlb file, I would like to access it from some unmanaged C++ code WITHOUT using the TLB/import command. But use a header file. Is there a way to extract a header file from a TLB? Thanks ...

(.net) Having my userControl have its own icon on the toolbox

Hello. I made a control that inherits directly from ErrorProvider. I thought that applying it the ToolboxBitmap attribute would be enough to get my control to have the same icon on the toolbox as the original control has, but it doesn't. It's strange, as if I add the control to the form, it will appear just as it should, but it doesn't c...

Close Button on Title Bar in MFC

In Vc++ 6.0 Dialog Based MFC application: I do not want my user close the window by pressing the button [X] in the top-right side of the window itself and also (Alt+F4). I want to display a messageBox ("Do you really want to close the application"); if the user clicks the OK button then the application has to close, else if user clicks t...

Visual C++ browse information

I am trying to figure out what the browse information (.sbr files) is used for but find only references how to create it. So what is it for? Thanks Dima ...

Using MFC in Windows service?

I'm starting to develop a Windows service. I want to use some classes from my own, that has little dependencies to some MFC classes like CString, CSocket, CArchive, CMemFile and CObject. MSDN says you need to be very careful about which pieces of MFC you use in the Windows service, but don't specifies it and don't describes the problems ...

Visual SourceSafe Reconciliation

What would be the ideal reconciliation mechanism between what is there in VSS 6.0 and what is there in our production environment? Our company outsources all its application support & development activities and are dependent on the vendor to provide the solution file to be kept in our VSS. We do have quite a number of projects and would ...

Visual Studio 2008 Generation of Designer File Failed (Cannot use a leading .. to exit above the top directory)

Hi, It seems the universe is against me this week. I have been happily coding away on my ASP.Net application for weeks now without issues. Today I tried to add a textbox to a form, and on saving the form, I received the following error: Generation of designer file failed: Cannot use a leading .. to exit above the top directory I googl...

Regex for searching Database-Statements in VisualStudio

I am currently working on a rather large project in Visual Studio 2008 with a lot of Database-Statements. The Statements are held in strings like this: string stmt = "SELECT ID, OTHER " + "FROM TABLE " + "WHERE CONDITION"; I was wondering how to find all Statements via regex. So I am not so good at regex, but maybe s...

How To Use Launch Conditions in Visual Studio .NET

How do you use Launch Conditions in Visual Studio .NET for oracle data provider when set variable in setup web application equal oracle? ...

SRS Report Page Orientation

Hello, I am new to creating SQL SRS (SSRS) reports in visual studio. I am impressed so far but I cannot find out how to set the Page Orientation in my new report from Portrait to Landscape. I would think this would be in the Report/Report Properties settings but it is not there? How do I change the Page Orientation from Portrait to...

Place created DLL and import library in separate directories

Is there a way in a Visual C++ Win32 DLL project to have the linker output the DLL to one directory and the import library (*.lib) to another? ...

Launching NUnit from Visual Studio can't load nunit.uikit.XmlSerializers

I have set my Visual Studio to start Nunit as an external program to run all the tests written in a module. It gives me this error: Could not load file or assembly 'nunit.uikit.XmlSerializers, Version=2.5.0.9122, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77 but if I run it from command-line: nunit.exe Tests.dll it launches just fi...

changing default location of Visual Debugger

The default location for visualizers is ...\Documents\Visual Studio 2008\Visualizers.I have the MyDocument folder mapped to a network drive at work. I copied the visualizer files (Mole visualizer) on the network drive folder. When I compile the project, it's suppose to copy the visualizer in the bin folder but it's not doing it. My guess...

Is there a detailed "how to" on Unit Testing for Visual Studio 2005

I have never written/run a unit test. I am a relatively young programmer, but I do a LOT of reading. I've been searching for information on unit testing because I see a lot about, but I haven't come across anything that has really spelled it out for me from step 1. I have Visual Studio 2005 Professional. I will be starting a new wi...