.net

Rules for multi-user WinForms apps on Vista

We have an MSI installer for a .Net WinForms app for Windows XP that installs and runs only as an admin. Users have to log in to the app when it runs. Customers want it to install and run under a user account under Vista, and to use their Windows account. A preliminary look through the code shows lots of problems; the installer writes t...

Why should a .net developer learn F#?

What is the new language F# is all about? Where is that going to be useful? And what is Microsoft's future plan (release road map) regarding this language? ...

Is there an embeddable Webkit component for Windows / C# development?

I've seen a few COM controls which wrap the Gecko rendering engine (GeckoFX, as well as the control shipped by Mozilla - mozctlx.dll). Is there a wrapper for Webkit that can be included in a .NET Winform application? ...

Is there a dynamic language based .NET build tool?

I might be starting a new project in .NET soon, and would prefer not to use an XML-based build tool like Nant or MSBuild. I like Rake, but I'm thinking it may be better to have something based on a .NET dynamic language (such as Boo), similar in spirit to gant or BuildR for Java. Is there such a thing for .NET? If not, what do you recomm...

How do you version your projects?

I understand that Microsoft uses this template when versioning their products: Major.Minor.Build.Revision. Major is changed when the "developers" want to show that there is a big change in the software and backward compatibility cannot be assumed. Maybe a major rewrite of the code is done. Minor number represents a significant enhanc...

Most efficient way to get default constructor of a Type.

What is the most efficient way to get the default constructor (i.e. instance constructor with no parameters) of a System.Type? I was thinking something along the lines of the code below but it seems like there should be a simplier more efficient way to do it. Type type = typeof(FooBar) BindingFlags flags = BindingFlags.Public | Binding...

Visual Studio Express Edition to get a MCTS Certification?

I'll teach in a 3 month course about the basis of .NET Framework, do you think that the Visual Studio Express Edition (both C# and Web development) are sufficient for learning or I need to buy a complete edition license for each guy involved (actually an EDU edition)? ...

Auto-generation of .NET unit tests

Is there such a thing as unit test generation? If so... ...does it work well? ...What are the auto generation solutions that are available for .NET? ...are there examples of using a technology like this? ...is this only good for certain types of applications, or could it be used to replace all manually written unit testing? ...

What software would you recommend for image enhancement prior to OCR (Optical Character Recognition)?

We are currently researching ways of enhancing image quality prior to submission to OCR. The OCR engine we are currently utilizing is the Scansoft API from Nuance (v15). We were researching the Lead Tools but have since decided to look elsewhere. The licensing costs associated with Lead Tools is just too great. To start with we are l...

Is there a way to indefinitely pause a thread?

I've been working on a web crawling .NET app in my free time, and one of the features of this app that I wanted to included was a pause button to pause a specific thread. I'm relatively new to multi-threading and I haven't been able to figure out a way to pause a thread indefinitely that is currently supported. I can't remember the exac...

Which language is better for general purpose programming, F# or Haskell?

I'm currently learning Haskell, Which language (F# or Haskell) do you prefer for programming general purpose applications? Which do you think is the stronger language? ...

Working with FedEx API and .Net

I am trying to get a list of rates for all available services from FedEx using 1 call, and having a tough time with their documentation. Anyone have some code snippets of how you interfaced with them? .Net code is preferable but anything will help more than their crapping code samples! Thanks ...

C#: Convert COMP-3 Packed Decimal to Human-Readable Value

I have a series of ASCII flat files coming in from a mainframe to be processed by a C# application. A new feed has been introduced with a Packed Decimal (COMP-3) field, which needs to be converted to a numerical value. The files are being transferred via FTP, using ASCII transfer mode. I am concerned that the binary field may contain wh...

Showing a tooltip on a non-focused ToolStripItem

ToolStripItems show Active highlighting when you mouse over them, even if the form they are in is not in focus. They do not, however, show their tooltips, unless the form is focused. I have seen the ToolStrip 'click-though' hack. Anyone know how to make a ToolStripButton show its tooltip when its parent form is not in focus? Thank...

How do you obtain Current Window Handle Count and Window Handle Limit in .NET?

I want to obtain the current number of window handles and the system-wide window handle limit in C#. How do I go about this? ...

Which are the "must follow" FxCop rules for any C# developer?

I'm planning to start using FxCop in one of our ongoing project. But, when i tried it with selecting all available rules, it looks like I have to make lots of changes in my code. Being a "team member" I can't right away start making these changes, like naming convention change etc. anyway i would like to start using FxCop with a minimal ...

C#: Interfaces - Implicit and Explicit implementation

What are the differences in implementing interfaces implicitly and explicitly in C#? When should you use implicit and when should you use explicit? Are there any pros and/or cons to one or the other? ...

Keep focus on an application

I have written an application which has a modal form. How can I ensure that this form does not lose the focus even when an other application is started? ...

What is the best method to gather data about the use of your application?

My company releases a small software product for which I've recently been taking over the development side. It is a C# Windows Forms application. One of the things I've noticed is that much of the information about how the software is used is filtered through my superiors and I get the feeling that I'm missing important detail in some ...

Do you use code generation tools?

Do you use code-generation tools (aside from those used to generate proxies and from designers built-in to visual studio)? What part(s) of your application do you generate? Do you typically roll your own generator? If so, what type of generator do you write (asp templates, coddom etc.). If not, what 3rd party tools do you use? I am ...