.net

Screenshot picker component for Winforms (.NET)

I'm looking for a tool/control/component that i can use to position over image control of my win form, and it will pick a screen shot from specific region the user will select. The user won't be able to move this "camera" out of the form, and after picking the partial image from the image control, i need the camera will mark the copied ...

Is there a (well hidden) generic enum anywhere in the BCL for Enabled/Disabled?

So, I just hate using true/false as method arguments for "enabled"/"disabled". To freely quote Jeff: "I dislike it on a fundamental level". I repeatedly find myself defining my own enums on every new project in different namespaces all over the place, like these: public enum Clickability { Disabled, Enabled } public enum Edita...

How to find all instances of types that implement a given interface during debugging

I am looking for a way to locate all current instances on the heap of types that implement a given interface (during WinDbg debugging that is). As interfaces are not types in the sense that you can create instances of an interface, they obviously do not show up when inspecting the heap. I.e. !dumpheap is of little help here. However, !d...

Remote Database Managemnet

I am looking for a .Net Web Application to manage a Sql Server 2005 database, i am thinking something along the lines of phpmyadmin. Note : My current hosting provider does not provide any management interface or allow direct connections. ...

VWD Sp1 download

I have VWD Express 2008. Where can I get the Service Pack 1 from? Thanks ...

How to getNames of DLLs used by appliaction (C#)

I'm looking the way to read all assemblies (DLLs) used by my app. In standard C# project there is "References" folder, when it is expanded I can read all libs used. GOAL is read programically (in runtime) all assemblies used by each project in my solution. Finally I'd like to see what libs are used by compiled *.exe application Do y...

Key value pair database in .Net

I have a database design problem , where the database object's properties are not fixed. And the application user need to have option to add propery to the object at any time. Since this can't be implemented in traditional database design with fixed number of columns, i am thinking about using key value pair design pattern And i am loo...

.NET 3.5 Client Framework redistributable ?

It's nice from Microsoft to offer things like the Client Framework for anybody who doesn't need the complete framework to run an application. But for about an hour I a searching the web for a redistributable version of this package. I can't find anything. It looks like Client Framework is only possible for Click-Once deployment or a boo...

Encoding.Default is not the same as no encoding in File.ReadAllText?

(Sorry if this is a dupe) I've just spent a long time trying to read a text file correctly. Having started with File.ReadAllText(path) and getting screwed-up characters, I tried several variants of File.ReadAlltext(path, Encoding) after which I got bogged down trying to analyse my input files to work out which byte was the problem, etc...

Self deletable application in C# in one executable

Is it possible to make an application in C# that will be able to delete itself in some condition. I need to write an updater for my application but I don't want the executable to be left after the update process. There is an official .Net OneClick but due to some incompatibilities with my HTTP server and some problems of OneClick itsel...

.NET: When are attributes instantiated and can I get a reference to the type they are decorating?

Two questions about attributes: When are attribute classes instantiated? When the type is first accessed, or at the start of execution? From within the attribute class, can I find out for which type the attribute was instantiated? The idea is that I want to make a list of all the classes in my assembly that have my attribute applied ...

Infragistics UltraListView auto scroll

Hello, Does anyone knows how to make the Infragistics UltraListView control scrolls down automatically whenever a new item is added? ...

Getting my screens' name in c#

I am aware of the Screen class, but when trying to use Screen.AllScreens[0], I get something like .\Device1. Instead, I'd like to have my screen's name, something like HP 24' something. How can that be done? Thanks ...

.NET Marshaler: Good documentation?

I'm currently working on some C# code that calls into a custom, native dll. When marshaling data back to C#, I have need to explicitly align the fields of the classes/structs used for marshaling. I've had a number of issues with this stemming from an incomplete understanding of the marshaler and its rules. For example, I recently foun...

C# Dynamic WHERE clause in a LINQ to SQL Query

I would like to execute a LINQ query with a dynamic where clause depending on how many different options a user has entered for their criteria. Is this possible? I have posted code below of how I would like it to work. Anyone got any suggestions? P.S. I have attempted using the .Contains method (generating a WHERE IN on SQL, however ...

Best Practice on IF/ELSE Statement Order

Which is a better practice? (I'm coding in .Net if that makes a difference) IF condition = true THEN ...true action--even if rare... ELSE ...action END IF or IF condition = [most common condition] THEN ...most common action.... ELSE ...least common action END IF ...

jquery like extend in c#/.Net

Jquery has utility a function called 'extend' which can be used to merge objects. It is very useful to merge default options with the user specified options , to get the effective options. Is there any similar function in c#/.Net ? class settings { public string Directory; public string Username; } settings default_set = new ...

Is the SetUp.exe file unique for Deployment Package?

Someone asked me this today after a failed file move, and I was not sure what to tell them. When you build a .NET deployment package you get the setup.exe and the .msi files. I know that the .msi file is needed... but for the setup.exe, is that unique? Meaning, can we just move the .msi file and be fine, or do we need to keep the two to...

Inspecting an instance of a COM / Interop class properly in VS.Net's debugger?

Good afternoon, does anyone know if and how it's possible to see COM / Interop objects properly (in their correct type) in VisualStudio's debugger? All I get is the 'evil' System.__ComObject value (even though it correctly identifies the type)? E.g.: ...

Save objects retrieved from web services

Hi I am totaly new to SubSonic, and have never used any other tool like it. I am not sure if SubSonic would be the right tool, or if there are any other tool that could help. Maybe someone can clarify things for me. :) The scenario is this: I have a c# application that fetches data from a set of secured web services, secured through W...