visual-studio

Moving a menu in Visual C#

I have a menu with the following structure (simplified for illustration purposes): Menu Bar |--File | |--Save | |--Exit |--Tools | |--Tool Category 1 | |--Tool Category 2 | |--Tool Category 3 |--Help |--About I want to reconstruct this as follows: Menu Bar |--File | |--Save | |--Exit |--Tool Category 1 ...

Why doesn't Visual Studio refresh the folders when I click the Solution Explorer refresh button?

In Visual Studio 2008, I can see all my project files in my Solution Explorer, and these files exist in an actual diectory. However, if I add a file to that directory (let's say, an test.sqlite file in the App_Data folder, or say, images created by some other program), then these files do NOT appear in my Solution explorer, even if I cl...

ScrollBar in DataGridView

I have a winform in vs2008 that contains a DataGridView. The datagrid contains a list with several columns. These are fixed width, exept one that I have set up to take whatever space is left and fill the width of the view. The winform is resizeable in all directions. The issue I am trying to solve is that when I increase the vertical si...

Why should I NOT use the /optimize switch to compile my C# code?

In Visual Studio 2008 there is an option "Optimize Code" that probably corresponds to the /optimize option. It is never enabled, not even when in "Release" mode. Why should I not want this option to be enabled at all times? ...

VS 2008 Designer not executing default constructor anymore?

Hi, I just tested which type of code is executed by the WinForms Designer in VS 2008. It seems that the designer is not executing the default constructor anymore. I added a simple thing like this.Text = "foo"; nothing is changed in the designer. Did I miss a change between VS 2005/2008? (or SP1) tia ...

DataGridView/ListView - Display in an Outlook style?

Hello all, I'm used to using Telerik Grids and I'm able to display them in an outlook style, i.e. a picture on the far left, a bold title and a few other lines of text under the main title. Is there a way do this using a standard .Net2.0 Windows control? Either with a cheap control, or the existing datagridview or listview? Basically,...

Crystal Reports: New Page

My application prints statements for customers. Naturally, I want each customer's statement to start at the top of a page. How do I make it do that? In the Section Expert, if I check 'new page before' the first group, it wastes a page at the beginning, and if I check 'new page after' the last group, it wastes a page at the end. I don't ...

How to log SQL calls with NHibernate to the console of Visual Studio?

I have the following configuration file for NHibernate: <?xml version="1.0" encoding="utf-8" ?> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> <session-factory> <property name="connection.connection_string">Server=.\SQLEXPRESS;Database=mydb;Integrated Security=True;</property> <property name="dialect">NHibe...

VisualStudio-based Rich Client Platform

I remember hearing about a rich client platform based on Visual Studio, similar to Eclipse's Rich Client Platform, that gives you things like auto updates, shells, help system and so on built in. I can't seem to find it on Google though, does anyone remember what this was called? ...

Defining an Entity Framework 1:1 association

I'm trying to define a 1:1 association between two entities (one maps to a table and the other to a view - using DefinedQuery) in an Entity Framework model. When trying to define the mapping for this in the designer, it makes me choose the (1) table or view to map the association to. What am I supposed to choose? I can choose either of ...

Visual Studio 2005 Search Memory

I don't think this exists, but I'll throw this out there anyway. Is it possible, while debugging, to search for a value in memory? For example, if I have a string "uniqueString" cached somewhere in memory, but I don't know under which variable it's stored--can I do a search for it? As in, find out which variable(s) have "uniqueString"...

Identifying DDD Bounded Contexts and Structuring Project

Hi, I'm trying to get my head around Domain Driven Design and the examples I've seen seem to make sense but I am still unsure of how to apply them to my specific situation. I am designing a CMS where a user can post/edit an article. These can then be viewed by other users who can also make comments, add tags etc. The question I have is...

Targeting ARM architecture with .NET compiler

When you compile windows application in .NET you can set "Platform Target" to be x86 or x64. This would optimize your code to a specific architecture of the processor and allow to escape IL. Does anyone know if there's something that would allow to achieve the same result for Windows Mobile application? I'm only interested in running my ...

can I include dll in exe (in visual studio) ?

To run my App I need AxInterop.WMPLib.dll and Interop.WMPLib.dll that are located in Debug and Release folder is there any way to include those dlls into exe? so my app is available in one file only. ...

What is the Visual Studio 08 C# Assembly Information GUID setting for?

I am developing a C# Application and I was verifying the setting for publishing the application. What is the GUID setting under the Assembly Information section? ...

How to make Visual Studio take automatic actions on check-in?

I'd like Visual Studio 2008 to do a get latest on the solution when I'm checking in, compile the code, run my tests, and if any of these fail, abort check-in. Is it possible to do it, and how? edit: We are using TFS for source control and nunit for testing. ...

Best type of Visual Studio project for a simple collection of files?

I've got a collection of HTML documentation that I'd like to add to my solution in Visual Studio. It's just a collection of files -- there are no build steps. What's the best way to add this to my solution? In the past I've used a C# class library project and disabled it in Build Configuration, but this felt wrong. A "Makefile project"...

Visual Studio: Preserving syntax coloring when pasting code into HTML

I'm writing some documentation that will occasionally include C# or C++ code snippets. In Visual Studio, the Edit/Copy command includes syntax coloring. You can see this if you paste the text into, e.g., Word or Outlook. In fact, if you use the "Paste Special..." command, you can see that it's "Rich Text (RTF)". However, when pasting t...

Is there a way to make a region of code "read only" in visual studio?

Every so often, I'm done modifying a piece of code and I would like to "lock" or make a region of code "read only". That way, the only way I can modify the code is if I unlock it first. Is there any way to do this? ...

How do I open a local SQL server database file outside of Visual Studio?

Is it possible to open a .mdf database file created in Visual Studio with some external SQL server IDE like Quest Toad for SQL server? Databases created in Visual Studio are rather similar to simple Access databases in that they're a single file. It appears external IDE's like Toad can't see the .mdf being served by my localhost's SQL ...