.net

Hosting Windows Workflow Designer

Does anyone have any experience hosting the Windows Workflow designer surface? I've seen a couple of rather difficult to follow examples on MSDN, but not much else - certainly nothing that offers an explanation into the process of hosting WF that is clear or easy to read... Are there better resources out there for hosting WF (or a workfl...

Install .NET Framework 2.0 on Embedded XP (Win XPE)

I'm trying to install the .Net framework version 2.0 on embedded Windows XP SP2 (aka XPE). I'm using the XPE specific version of the installer from Microsoft: http://www.microsoft.com/downloads/details.aspx?familyid=c4837dad-5719-4b63-8752-cb0a65802329&displaylang=en When the installation starts it fails with the following error: ...

How to make a window have taskbar text but no title bar

How can I make my window not have a title bar but appear in the task bar with some descriptive text? If you set the Form's .Text property then .net gives it a title bar, which I don't want. this.ControlBox = false; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.MaximizeBox = false; ...

Redirect Trace output to Console

Let's say I'm working on a little batch-processing console app in VB.Net. I want to be able to structure the app like this: Sub WorkerMethod() ''//Do some work Trace.WriteLine("Work progress") ''//Do more work Trace.WriteLine("Another progress update") ''//... End Sub Sub Main() ''//Do any setup, like confirm the...

What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?

What’s the difference between the System.Array.CopyTo() and System.Array.Clone()? ...

Changing the background color of a DateTimePicker in .NET

In .NET (at least in the 2008 version, and maybe in 2005 as well), changing the BackColor property of a DateTimePicker has absolutely no affect on the appearance. How do I change the background color of the text area, not of the drop-down calendar? Edit: I was talking about Windows forms, not ASP. ...

How do I raise an event via reflection in .NET (c#)?

I have a third-party editor that basically comprises a textbox and a button (the DevExpress ButtonEdit control). I want to make a particular keystroke (Alt-Down) emulate clicking the button. In order to avoid writing this over and over, I want to make a generic KeyUp event handler that will raise the ButtonClick event. Unfortunately, ...

.NET assemblyBinding configuration ignored in machine.config

I have a situation where I need to be able to load assemblies in the GAC based on their partial names. In order to do this I have added the following to my app.config file: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <qualifyAssembly partialName="MyAssembly" fullName= "MyAssembly, Ver...

What, if any, printable character did a user type based on the values in a given System.Windows.Forms.KeyEventArgs?

As a workaround for a problem, I think I have to handle KeyDown events to get the printable character the user actually typed. KeyDown supplies me with a KeyEventArgs object with the properities KeyCode, KeyData, KeyValue, Modifiers, Alt, Shift, Control. My first attempt was just to consider the KeyCode to be the ascii code, but KeyCod...

How do you map a native to IL instruction pointer in-process

When using the unmanaged API for the .NET framework to profile a .NET process in-process, is it possible to look up the IL instruction pointer that correlates to the native instruction pointer provided to the StackSnapshotCallback function? As is probably obvious, I am taking a snapshot of the current stack, and would like to provide fi...

RegEx to tell if a string does not contain a specific character

Easy question this time. I'm trying to test whether or not a string does not contain a character using regular expressions. I thought the expression was of the form "[^x]" where x is the character that you don't want to appear, but that doesn't seem to be working. For example, Regex.IsMatch("103","[^0]") and Regex.IsMatch("103&","...

Linq to SQL - Can you submit changes for a single object?

Is there support in Linq to SQL for submitting changes to a single object? The SubmitChanges method sends all of the changes to the database, but what if I'm associating with an errorlog table and only want to save the records going into the errorlog without submitting all of the changes to my other tables? Example: Object Action (ID, ...

Suggestions for a MessageBox.Show replacement that does not block GUI thread?

a while back I ran across a situation where we needed to display message-boxes to the user for notifications but we could not use MessageBox.Show because it blocks the GUI thread (so nothing on the screen gets updated while the dialog is active). Any suggestions on an alternative? [I coded an alternative at the time but I don't like it....

OS Compatibility for various .NET Framework versions

What are the minimum OS requirements for each of the .Net frameworks? E.g. for which version is it impossible to run each OS on: Windows 95 Windows 98 Windows 98SE Windows ME Windows NT 3.x Windows NT 4 Windows 2000 I believe all .Net frameworks are compatible w/ XP, Vista, Windows Server 2003, and Windows Server 2008 (please correc...

Using an ObservableCollection<T> with Background Threads

It seems like Microsoft had a great idea with the ObservableCollection. They are great for binding, and are super fast on the UI. However, requiring a context switch to the Dispatcher Thread every time you want to tweak it seems like a bit much. Does anyone know the best practices for using them? Is it simply to populate an ICollecti...

.NET Runtime Event Id 5000

Does anyone know how to decipher a .NET Runtime Event Id 5000 error? I have run that's logged as: P1: <assembly name>,exe P2: 2.1.4.1 (assembly version) P3: 48b2b154 P4: System P5: 2.0.0.0 P6: 471ebf0d P7: 575 P8: 1d P9: n3ctrye2kn3c34sgl4zqyrbfte4m13nb P10: NIL I assume those are either the register values of the CLR VM, or ...

Need a good tool to explore a process and threads

We have some problems at our production code, my main problem is that we have some process that growing too much, as I think connections that someone forget to close. or maybe a communication error that causes them to be orphans. I am looking for a good tool to explore those process (also threads). I already know the Process explorer, ...

How to detect what .NET Framework versions and service packs are installed?

A similar question was asked here, but was specific to .NET 3.5. Specifically, I'm looking for the following: What is the correct way to determine which .NET Framework versions and service packs are installed? Is there a list of registry keys that can be used? Are there any dependencies between Framework versions? ...

Is there anything like C# (.NET) Library that works as API for Google?

I'd like to write a script to search and analyze results at google.com. Recently, I've been ng looking for Google API but it seems they do not issue it to developers anymore. Is there any (likely free) library for C#(.NET) development that would allow me to search over Google with parameters? Thanks for your response. ...

Is there a .NET namespace where I can find the WIN32 API message-related #defines, like WM_COMMAND, etc

I'm overriding WndProc, so I want to write code like if (m.Msg == WM_COMMAND) my special stuff else base.WndProc(ref m) ...