.net

How to implement file upload progress bar on web?

I would like display something more meaningful that animated gif while users upload file to my web application. What possibilities do I have? Edit: I am using .Net but I don't mind if somebody shows me platform agnostic version. ...

Programmatically extract macro (VBA) code from Word 2007 docs

Is it possible to extract all of the VBA code from a Word 2007 "docm" document using the API? I have found how to insert VBA code at runtime, and how to delete all VBA code, but not pull the actual code out into a stream or string that I can store (and insert into other documents in the future). Any tips or resources would be appreciat...

Autoupdating .net applications

I've written 2 reasonably large scale apps in .net so far, and both of them have needed an updating facility to automatically update the application when I roll out new code. I've found the 'Enterprise application block updater' a bit too complex for my needs, and I've found 'click once' frustrating when it comes to publishing. The mos...

How often do you use System.Component.BackgroundWorker in your UIs ? (if ever)

I am sure a responsive UI is something that everyone strives for and the reccomended way to do stuff is to use the BackgroundWorker for this. Do you find it easy to work with ? Do you use it often ? Or do you have your own frameworks for lengthy tasks and reporting process. I have found that I am using it quite a lot and even using it...

Learning .NET

Assuming all goes well and I get employed by the company I am about to interview with I will probably need to learn .NET and C# I already know PHP, Python, Java and some C (Pointers and Memory Management are not so good) so I'm going to be able to do it if I can find a good tutorial to cover the key parts of it, does anybody have a link...

I understand threading in theory but not in practice in .net

I have a basic cs-major understanding of multi-threading but have never had to do anything beyond simple timers in an application. Does anyone know of a good resource that will give me a tour how to work with multi-threaded applications, explaining the basics and maybe posing some of the more difficult stuff? ...

Best .NET memory and performance profiler?

We are using Jetbrains' dotTrace. Can anyone recommend any other profiling tools that you think are better for profiling C# Windows Forms applications? ...

Garbage Collection: Is it necessary to set large objects to null in a Dispose method?

Is it necessary to set large objects to null when implementing a Dispose method? ...

In what order are locations searched to load referenced DLLs?

I know that the .NET framework looks for referenced DLLs in several locations Global assembly cache (GAC) Any private paths added to the AppDomain The current directory of the executing assembly What order are those locations searched? Is the search for a DLL ceased if a match is found or does it continue through all locations (and i...

Is Visual Studio 2003 still available/supported

Pretty much what the title says really. We have some code that is .NET 1.1 based and no real desire to up-convert it. However, we are looking to add developers to the team and they will need copies of Visual Studio. My understanding is that they will need VS 2003 - as this is the only IDE that supports .NET 1.1 but I am wondering if w...

Comparing two collections for equality

I would like to compare two collections (in C#), but I'm not sure of the best way to implement this efficiently. I've read the other thread about Enumerable.SequenceEqual, but it's not exactly what I'm looking for. In my case, two collections would be equal if they both contain the same items (no matter the order). Example: collectio...

How to promote WCF to a non-techie?

How would you describe and promote WCF as a technology to a non-technical client/manager/CEO/etc? What are competing solutions or ideas that they might bring up(such as those they read about in their magazines touting new technology)? What is WCF not good for that you've seen people try to shoehorn it into? ...

Interprocess communication for Windows in C# (.NET 2.0)

I've never had to do IPC on Windows before. Currently I'm developing a pair of programs, a standard GUI/CLI app and a windows service. The app has to tell the service what to do. So, assuming the communication is local only, what would be the best communication method for these two processes? Where best is defined as more robust and les...

View of allocated memory

I'm looking for a tool ($, free, open source; I don't care) that will allow me to view not just the memory statistics for a .NET program, but also the object hierarchy. I'd really like to be able to drill down each thourgh each object and view it's foot print, as well as all the object's it references. I've looked at things like Ants Pr...

.MSI Not Always Uninstalling Previous Versions

In a number of applications we create an MSI Installer with the Visual Studio Setup Project. In most cases, the install works fine, but every now and then the previous version was not uninstalled correctly. The user ends up with two icons on the desktop, and in the Add/Remove program list, the application appears twice. We have yet to fi...

TreeView Drag & Drop help - _Invalid FORMATETC structure_ exception

Hi, I'm trying to implement Drag & Drop functionality with source being a TreeView control. When I initiate a drag on a node, I'm getting: Invalid FORMATETC structure (Exception from HRESULT: 0x80040064 (DV_E_FORMATETC)) The ItemDrag handler (where the exception takes place), looks like: private void treeView_ItemDrag(object sender, ...

Why is AppDomain.CurrentDomain.BaseDirectory different between Windows Forms and Library...

In my winforms application, AppDomain.CurrentDomain.BaseDirectory is set to "C:\Projects\TestProject\bin\Debug\" In my unit tests it is "C:\Projects\TestProject\bin\Debug" (no final slash). Why is this? [Edit] @Will : I am asking why the test project's directory doesn't have a trailing slash? ...

Image library that will auto-crop

I'm looking for a .Net library that will accept an image or filename and an aspect ratio, and crop the image to that aspect ratio. That's the easy part: I could do it myself. But I also want it to show a little intelligence in choosing exactly what content gets cropped, even if it's just picking which edge to slice. This is for a pers...

Font-size independent UI: everything broke when I switched to 120 DPI!?

So I was reading those Windows Vista UI guidelines someone linked to in another question, and they mentioned that you should be able to survive a switch to 120 DPI. Well, I fire up my handy VM with my app installed, and what do we get... AAAAGH!!! MASSIVE UI FAIL! Everything's all jumbled: some containers aren't big enough for their tex...

Context Menu Resets ComboBox's SelectedIndex

I have a ContextMenu that is displayed after a user right clicks on a ComboBox. When the user selects an item in the context menu, a form is brought up using the ShowDialog() method. If frmOptions.ShowDialog() = Windows.Forms.DialogResult.Cancel Then LoadComboBoxes() End If When that form is closed, I refresh all the...