visual-studio-2008

How do I use functions from a DLL?

How do I use functions from a DLL? I'm a total newbie and I don't really understand how to use functions from a DLL file. I'm trying to use MS Visual Studio 2008 (C++). My understanding is that the DLL files will have corresponding header files and as long as I include the header files and call the functions normally in my code, it shou...

Is there a way to modify Visual Studio 2008 or 2010 project pre-build events from within your code in C#?

Is there a way to modify Visual Studio 2008 or 2010 project pre-build events from within your code in C#? Does C# have such preprocessor directives that would allow one to configure what gets run before project compilation and build? The purpose of this is to scan the project for shader effect files (.fx) and recompile them without edit...

visual studio 2008 vs 2010 Pro unmanaged code

Hi, I'm a C++ programmer, I use Visual Studio 2008 Professional, only unmanaged code. I'm thinking of buying VS 2010 Pro. I'm confused, I don't know what are differences between those two. I know that, in plus, it has tr1 included. When I started using 2008 edition I was very pleased to see f.e. unit testing support but all new features...

How to show controls hierarchy in Winform designer

Hi, One of our client has an old winform application that contains forms with a lot of controls on them. Some of those controls have a deep hierarchy and that make it to hard to select them in the designer. I would need to understand this hierarchy to make modification and correct some bugs, is there a tools, plugin or something to be ...

Service and Web Reference crashes Visual Studio

When I move the mouse over any of these two or right click any of them Visual Studio crashes with the following message in the event log: Felet uppstod i programmet med namn: devenv.exe, version 9.0.30729.1, tidsstämpel 0x488f2b50 , felet uppstod i modulen med namn: ntdll.dll, version 6.1.7600.16385, tidsstämpel 0x4a5bdb3b Un...

Windows CE 5.0 emulator needed

I need an emulator for Windows CE 5.0 to test an embedded device (not PDA or smartphone) application that I am developing. This is what I have already tried: Visual Studio 2008 Pro includes an emulator. Unfortunately, it does not include a Windows CE image (only Windows Mobile and Smartphone). Yes, there is a difference, see the screen...

Can you have a web application project produce multiple DLLS?

I have a VS 2008 web application project that is getting large. My structure looks like: - WebRoot - Common/ - Foo/ - Bar/ - Baz/ so I end up with a single Webroot.dll that contains the code for common, foo, bar, and baz. Is it possible to set it so that I end up with common/ in webroot.dll, and code in foo ends up in foo.dl...

Why does Visual Studio use such a strange regex syntax

Is there any reason why Visual Studio uses such a strange syntax (for instance in the search/replace dialog)? Instead of writing \s*(\w+) = new Process\(\) I have to write :b*{:a+} = new Process\(\). I am always struggling with this syntax - especially since the normal .net syntax is the former one. This is an incomplete comparison bet...

How to "pin" C++/CLI pointers

I am wrapping up a class which reading a custom binary data file and makes the data available to a .net/c# class However a couple of lines down the code, i start getting the memory access violation error which i believe is due to the GC moving memory around, the class is managed Here's the calling code in C# - reader is mixed code ( m...

Disable CTRL+P in WPF DocumentViewer

I'm working on a new presenation component for one of our applications. I am building a Custom WPF Control that just has a DocumentViewer in it and hosting that CC in a Windows Forms application with an ElementHost. I'm using Visual Studio 2008 with C#. I have customized everything through the XAML to give it the look and feel that in...

C# VS 2008 Build Configurations - using different classes for different builds

I'm writing an application which has two classes that provide basically the same functionality but for different situations. I'd like to have three versions of the software - one where the user can change an ini file to configure the program to use one of the two classes, and then one version that only uses one of the two classes. Righ...

Reverse P/Invoke tutorial ?

I've a old C/C++ class that i want to refactor and access from .net using PInvoke All P/Invoke tutorials refers to call win32 api but i haven't found anything to code the other side Any tips/ideas ? my c/c++ experience is pretty rusty :( UPDATE - this is for wrapping existing C/C++ code so it can called from .net using P/Invoke How d...

How to organize xml data using equivalent to #region / #endregion (outlining) from C# .NET

I'd like to organize my XML data to be collapsable and expandable using a preprocessor command like the #region/#endregion command in C#/.NET. I'm editing this file Visual Studio 2008. Does any such ability exist? I've googled to no avail. The closest I can come to so far is to expand and collapse the tags themselves, so I can collaps...

Is there a preferred method of including the source code(s) of other software you've used in your application?

I've used a few F/OSS libraries in my commercial application. As per their licenses, I am obligated to include their source codes along with my VS2008 application. This is my first time making a "real" commercial application, and I would appreciate some advice on how best to go about including their source codes. I don't want to packa...

Automatic Step over

I have been getting this error message when I step into some methods Do you want to continue being notified when an Automatic step over occurs? I usually answer Yes and I get taken to the line I want to step to. However, I just pressed No (cause I was tired of the dialog box always popping up). When I did that it skipped a lot of c...

How to display middle value in a RDLC report where count equals 3?

I'm currently using an RDLC report and ReportViewer control to display a report to the user. The report needs to be formatted in a certain way so just creating a table and iterating through won't work. My database is set up to be pretty normalized. For example, two tables I have are a "PersonalData" table with a ID and a "PhoneNumbers" t...

Force VSProps settings to override project settings

I have a vsprops file that defines the optimizations all of our projects should be built with for Visual Studio 2008. If I set the properties for the project to "inherit from parent of project defaults" it works, and fills them in the vcproj file. However, this doesn't protect me from a developer checking in a project file that changes t...

Is there a way to switch off wpf design surface in Visual Studio 2008?

I would like to know if there is a way to simply turn of the WPF design surface in Visual Studio 2008. I would like to have the xaml editor, but not the design surface as it slows down the IDE, when I try to open a XAML file. For my workflow having only the source files for xaml would be a better fit as I am doing all visuals in Blend. ...

Bizarre problem with WPF XAML file.

I've just started a very simple WPF application which consists of a main large image and four smaller images. In order to assist with the layout, I created some JPEGs in MsPaint containing the images -2, -1, 0, +1 and +2 and just copied them into the top level of the project directory. The XAML segment contains, for the five images: <...

Is it possible to create custom methods in entity classes in linq to sql

I have a table Site in SQL with (amongst others) three properties idReviewer1, idReviewer2, idReviewer3. Now I would like to create a methods on the entity class of Site to check if a user is a reviewer: partial class Site { public bool IsReviewer(int idUser) { return idReviewer1 == idUser || idReviewer2 == idUser || i...