visual-studio-2008

C# using the scrollbar control / event (without textbox or window scroll)

I need to allow a long label to be scrolled through on it's own. I do not want a text-box of any sort. I would like to be able to format the text inside. It definitely needs to scroll own its own, not with the window. I have added a scrollbar successfully, but I have no idea how to begin to use it's event/s. thanks i tried using a pane...

Did visual studio add namespace to resource file?

Hi, Years ago, I use resource file to support internationalization. When a resource file was added. A namespace corresponding to the file name is generated. Then, you can access it from the code. For example, if you have a "Resources.resx" and have a string named CompanyName. You can use it as the following code: lblCompany.Text = Reso...

How to get Visual Studio to generate the override stub for an event declared in a base type?

I'm trying to override an event handler in a subclass - how can i get VS2008 to generate the stub? For that matter can it generate the code for a method override? Is there a trick? ...

Can the controller code generation template be changed?

In Visual Studio when you add a new controller to your MVC application some macro creates a file with methods like: // // GET: /Thing/Details/5 public ActionResult Details(int id) { return View(); } I want my methods to look like: /// <example>GET: /Thing/Details/XXX...</example> public ActionResult Details(Guid id) { return...

Precompiled Headers

I have a sample project (not mine) which is in Visual C++ 6. I'm trying to convert it to Visual Studio 2008. The older project is using precompiled headers. Now the questions are: What are precompiled headers? Since the older project is using precompiled headers. I'll also use them in Visual Studio 2008 (the new project). But I get er...

How to create a Visual-Studio string visualizer?

I was trying to create a visualizer for IDictionary or ICollection Then like the simple visualizer (without dialog; I mean the ususal string visualizer that appears when hovering the variable, see image below), I want to make my custom text, I want to cast the collection to its type's list (I.E. StringCollection to List(Of String) or Li...

AttachmentCollection attachmentCollection in C#

I am trying to utilize the AttachmentCollection Class in C# and when I try to create a new instance of it it gives me an error saying "Error 32 The type 'System.Net.Mail.AttachmentCollection' has no constructors defined".... Here is what I was trying, how to a create a new instance of this if there are no constructors defined ? Attachme...

User settings keep resetting to default after each deployment

My deployment of upgrades to an application written in C# (.NET 3.0) consist of simply replacing an older .exe with the new one. Because that older version can currently be used by some customers, I simply rename the old version to blahblah.exe.old and copy the new one to the same folder. When the user opens up the application again, the...

C#: My dialog return value doesn't work

I have a custom form that's returning the values to the main form but it's not seeing the variables. I don't think I'm making this very clear so I'll include the links to the examples of what I'm trying to do. http://stackoverflow.com/questions/818785/return-values-from-dialog-box too long to display I know I'm probably overlooking som...

Whats a Good Example to Write XML using VB.net 2008.

Using this example how would I go about updating an XML file using this example: <foo> <n1> <s1></s1> <s2></s2> <s3></s3> </n1> <n1> <s1></s1> <s2></s2> <s3></s3> </n1> </foo> I Can read from it all day long but for the life of me I cannot seem to write it back into that format. ...

Visual Studio 2008 Project won't load, but no errors

Hi, I've got a VS 2008 SP1 solution with multiple projects. Two of the projects appear in the list, but they have a folder icon instead of the normal project icon. The folder is grayed out and I can't expand the folder. The files are definitely available and security is fine. I edited the SLN file and removed the projects, then re-...

Nonsensical Parsing Errors after Removing Code Behind from ASP.NET MVC Project

Hi all, I've recently upgraded an ASP.NET MVC Project written with the Beta version of the framework to the use the full 1.0 version. Part of this process involved deleting all the unused code-behind files associated with the view pages. However, since I've done this, whenever I open an .aspx or .ascx in Visual Studio, I get hundreds ...

TFS source control of SSIS projects in Visual Studio 2008

Consider these 2 machines: #1: Full SQL Server 2008 without Team Explorer (test SQL box) #2: Development box with Visual Studio 2008 SP1 with Team Explorer I use Team Foundation Server 2008 and would like to check SSIS projects into source control. Do I need to install BIDS as a separate Visual Studio 2008 shell in my machine #2? I ...

Why does popping from one stack actually pop from multiple separate stacks?

I have tried to simplify and annotate the code which is giving me a headache below. It demonstrates my problem. Simply put, I have two separate stacks and I am trying to pop from one stack. For some reason, when you pop one of the stacks, it actually seems to pop the other one as well?! Is this by design and if so, why and how should...

Is it possible to Read and Step into .NET Framework Source Code

Is there any way for people using VS2008 to step into and read the source code for the MSDN libraries? I come from a Java background where this is possible... ...

Is there a way to have Resharper fix everything on the file (with the first option)

I am doing a lot of refactorings with Resharper. It would be really nice if there was a way to tell Resharper to fix everthing it finds as it sees fit. Anyone know a way to do that? ...

Can I tell if a property has been accessed via Rhino Mocks

I have a property in an interface that I have mocked using Rhino Mocks. I want to know if it was accessed in my unit test. Is there a way to see if the property was accessed via Rhino Mocks? I found this code here but it does not seem to work: string name = customerMock.Name; customerMock.AssertWasCalled(x => {var ignored = x.Name;})...

How can I set a value to a Rhino Mocked object?

I have a scenario like this: form = MockRepository.GenerateMock<IAddAddressForm>(); mediator = new AddAddressMediator(form); The mediator is the real object under test and needs to be able to set values for the "form" object. But the only way I can see to set values for the form object is like this: form.Stub(x=>x.FirstName).Ret...

How to write unit test for ASP.NET MVC using VB.NET

Hi, Can you help with the problem which i'm currently facing? We've created ASP.NET MVC application with "Out Proc" seesion state managment. We are using strong type session in our control class. Here sample code FYR.. Public Class CustomerController Inherits TxnProcess TxnProcess -- this class extended by another class which is...

Visual Studio 2008 Debugging

I have an application that has two distinct parts, one operation that process data and adds it to a database and a second operation that retrieves the data and makes a report. Is there a way to tell the debugger to start at the second operation of the application? Previously I've commented out what I didn't want to run and worked aroun...