.net

Are there any free ways to turn an html page into an image with .net

I want to take html, including the text and images and turn it into one image containing everything. Is there a free way to do it? This is using .net 3.5. See also: Server Generated web screenshots? What is the best way to create a web page thumbnail? ...

.NET : How to set user information in an EventLog Entry?

The System.Diagnostics.EventLog class provides a way to interact with a windows event log. I use it all the time for simple logging... System.Diagnostics.EventLog.WriteEntry("MyEventSource", "My Special Message") Is there a way to set the user information in the resulting event log entry using .NET? ...

Copy collection items to another collection in .NET

In .NET (VB), how can I take all of the items in one collection, and add them to a second collection (without losing pre-existing items in the second collection)? I'm looking for something a little more efficient than this: For Each item As Host In hostCollection1 hostCollection2.Add(item) Next My collections are generic collectio...

Can you recommend a .cvsignore file for a Visual C#.NET solution?

Hi all, I've developed a Visual C#.NET 2008 Express Edition solution containing three projects. I am cleaning it up to commit it into a CVS repository. There are several files that are created during the build process that are not necessary to be placed in the repository since they will be regenerated automatically. The question: Can ...

When memory is allocated for a program?

I need to know when the memory will be allocated for a particular program. How can i view where the memory is allocated. ...

Determining if the window is in help mode

Developing a .NET WinForms application: how can I check if the window is in Help mode (i.e. after clicking the "?" button in the title bar)? The problem I have is that my System.Windows.Forms.ToolStripItem objects do not have a HelpRequested event (because they do not inherit from Control) so in the Click event handler, I am trying to d...

How to make RightToLeftLayout work for controls inside GroupBoxes and Panels?

According to MSDN form.RightToLeftLayout = True; form.RightToLeft = ifWeWantRTL() ? RightToLeft.True : RightToLeft.False; is enough to mirrow the form content for RTL languages. But controls placement gets mirrowed only for controls immediately on the form, those inside a GroupBox or a Panel are not mirrowed, unless I put them on a ...

Why does regasm.exe register my c# assembly with the wrong GUID?

I've got a c# assembly which I'm invoking via COM from a Delphi (win32 native) application. This works on all the machines I've tested it on, except one. The problem is that the Delphi application gets "Class not registered" when trying to create the COM object. Now, when I look in the registry under HKEY_CLASSES_ROOT\DelphiToCSharp\C...

How can I assign a datasource to a generic list collection?

I have a generic list, i.e. List<myclass>. Here myclass contains two string properties. How can I assign a datasource to the list collection? ...

Saving a SecureString

One of the feature requests I've got for the program I'm working on is to be able to save the list of credentials users enter in, so they can be shared around. The specific use case that inspired this request was using our program on a large corporate network, made up of fairly good LANs connected by a flaky WAN. The idea was that, inste...

How to convert generic dictionary to non-generic without enumerating?

I want to convert an instance of generic IDictionary to non generic IDictionary. Can I do it without creating new instance of IDictionary? Is any framework support for this task? I tried wrap generic IDictionary in class that implements nongenetic IDictionary however I discovered that I have to also somehow convert generic ICollection ...

.NET Remoting and Server 2008 (64 Bit)

I have a .NET application that is meant to be run on a local PC and started from a file share on the LAN. It works fine on 32 bit Windows XP and Vista workstations. But it fails with a System.InvalidOperationException on 64 bit Windows Server 2008. It runs fine locally on all three configurations. What could be the cause? .NET 2.0 i...

How to get WCF statistics from inside an application that uses it?

Is it possible to gather performance statistics programmatically from inside a WCF application? For example, the number of connections open or requests received. ...

Problem using large binary segment in OOXML

System Description A plotting component that uses OOXML to generate a document. Plotting component consists of several parts. All parts are written in C++ as exe + dll's, with the exception of the interface to the OOXML document. The latter component is a COM component that was created in C#/.NET. The main reason for this is that the...

Is the sorting algorithm used by .NET's `Array.Sort()` method a stable algorithm?

Is the sorting algorithm used by .NET's Array.Sort() method a stable algorithm? ...

How to make a method exclusive in a multithreaded context ?

I have a method which should be executed in an exclusive fashion. Basically, it's a multi threaded application where the method is invoked periodically by a timer, but which could also be manually triggered by a user action. Let's take an example : The timer elapses, so the method is called. The task could take a few seconds. Right af...

"Colorizing" images in .NET

Is there any simple way to programatically colorize images in .NET? Basically we have a black and white image and need to put a layer of say pink above it and reduce the opacity of that layer to make the picture colorized in pink. ...

How to Regex search/replace only first occurrance in a string in .NET?

It seems the .NET Regex.Replace method automatically replaces all matching occurrences. I could provide a MatchEvaluator delegate that returns the matched string after the first replacement, rendering no change, but that sounds very inefficient to me. What is the most efficient way to stop after the first replacement? ...

Entlib versus ACA.Net - Does ACA.Net provide any advantage?

My understanding is that Entlib has picked-up and included concepts from ACA.Net. Is there any point to using ACA.Net on a new .net project? ...

Has anyone written a thread-safe BindingList<T>?

I am currently getting exceptions when modifying an IBindingList on multiple threads. Does anyone have a threadsafe version before I write my own? ...