.net

Upgraded Infragistics and my application is not allowing Ultrawingrid to be editable anymore

I have an application that uses the Ultra Win Grid and has a column with a check box in it. It used to be that when I clicked on the check box it would allow you to edit it but now you can't. Already checked and I am setting CellClickAction to Edit and CellActivation to allow edit. I used to be using 6.3 and upgraded to 9.1. The prob...

Loop Through An Objects Properties In C#

I have two objects of the same type, I want to loop through the public properties on each of them and alert the users what properties dont match. Is it possible to do this without knowing what properties the object contains? Thanks ...

WPF - TreeView.FindName() problem

How come TreeView.FindName() can find things added to the Xaml doc at compile time but not dynamically added at runtime? ...

.NET on a locked down computer

Might seem like a bizarre request, but is there anyway to run .NET apps on a locked down machine without installing the runtime? If a set of my users is going to working on machines that are totally locked down, no .NET runtime and no way to install it, is there anyway to 'host' the runtime? I was thinking along the lines of portable u...

Trigger an event from within another class

In .NET I have a class called Caption. I have another class called Gauge. Within the Gauge class I have a property defined as a Caption. I am trying to figure out how to do the following: When a certain property is changed in my Caption class how do I get it to execute a subroutine in the Gauge class? I am thinking I have to declare an ...

Use regex to find specific string not in html tag

I'm having some difficulty with a specific Regex I'm trying to use. I'm searching for every occurrence of a string (for my purposes, I'll say it's "mystring") in a document, EXCEPT where it's in a tag, e.g. <a href="_mystring_"> should not match, but <a href="someotherstring">_mystring_</a> Should match, since it's not inside a ta...

How can I add a performance counter to an category i have already created

Hi I have created a PerformanceCounterCategory like below var category = PerformanceCounterCategory.Create("MyCat", "Cat Help", PerformanceCounterCategoryType.SingleInstance, "MyCounter", "Counter Help); Now i would like to add a new counter to the category to monitor another item but i can't find the api call to do it. Any Ideas? ...

How would you improve our Unhandled Exception Handler error message?

We are three internal developers with a user count of about twenty. We've implemented unhandled exception handling in our Winforms app. It generates a ticket with the stack trace in our FogBugz (renamed internally to DevTracker) bug tracking system. The goal is to encourage the user to enter an informative bug rather than simply movin...

repeater .net properties and methods

With a .NET repeater is there anyway to call methods in the #Eval('') directive? For example, if I am binding to an object with a DateTime property, it would be really convenient to set #Eval("ADateTimeProperty.ToString('hh:mm')") or something along those lines. Is the only option to create another property with that returns a formatte...

Problem - Java Web Service Consumed by .NET

I am facing an issue while consuming a java web service from .NET. I am able to provide the input to the web serive but not able to get back the result. The result is a custom object which is created in Java with one long, one short and one string variable. But the output I am getting from .NET is that long and short are always defaulted...

Are the following Lambda and Linq expressions equivalent?

Hi Everyone, Are the following Lambda and Linq expressions equivalent in terms of execution paths? I guess I'm wondering if the Linq is going to run differently because it's going to create an IEnumerable before determining if the enumeration has anything in it whereas the lambda expression will stop on the first digit it finds. var x ...

Are there any tools for parsing a Visual c++ generated resource script?

Are there any tools for parsing a Visual c++ generated resource script? Is this resource script's format documented any where? I am looking for something in MFC or .net that could parse some data out of the files for reporting. ...

Storing string values as constants in the same manner as Enum

I know there is a way to make enum work for string types with conversions galore - the code doesn't look pretty. Does anyone know of any way to have something like this: public SOMESTRUCTURE SessionKeys : string { value1 = "value1key", value2 = "value2key", name = "name" } so later in my code I could refer to it as: ...

What is the quickest way to stream an image from a FILESTREAM in SQL to a browser?

I have images stored in my database in a FILESTREAM and I am trying to find out what the best solution is to get that image back out into a web browser. If I was managing the files on the file system myself, the quickest way would just be: Response.TransmitFile(pathToFile); This does not load the file into memory before transmitting ...

Force Windows to show a system tray icon

This is a pretty stupid question, but here goes: Is there a way (in .net) to force Windows to show your system tray icon instead of hiding it? I don't want to do this all the time, but at least for the first time my application is run I would like it to be visible in the system tray. ...

Is it possible to use a MySql User Defined Variable in a .NET MySqlCommand?

I'm trying to execute a query that currently works in phpMyAdmin but it does not working when executing it in .NET using the MySqlAdapter. This is the Sql statement. SELECT @rownum := @rownum +1 rownum, t . * FROM ( SELECT @rownum :=0 ) r, ( SELECT DISTINCT TYPE FROM `node` WHERE TYPE NOT IN ('ad', 'chatroom') )t It is using...

Modelling database tables into classes

I'm designing a personal project which is largely database driven. I'm trying to come up with a good design for how to handle database interop, and I'd like the input of the experienced minds here at StackOverflow. Is the following good design, or is there a more standard way of handling communication with the database? EDIT I was main...

How are the objects created or used in a P/invoke function or RCW native function are released/disposed?

How are the objects created or used in a P/invoke function or RCW native function are released/disposed? will .Net GC take care of that? Does GC have any control over those objects? Is it the developers sole responsibility to release/dispose those objects by calling their .Close() or .Release() methods? Please guide me. Thanks and ...

Recommended unit test framework for new .NET projects

I'm about to start a new C# application, which will probably take some while (read: > 1 year). I want to keep it cross-platform, that is, it should work using Mono, but my primary development platform is Visual Studio. Now I'm looking into the test frameworks, but I wonder which one you would take for both being portable and reliable in...

What are the available runtime settings for app.config files in .NET?

In the app.config file of a .NET application there is a <runtime> element that allows you to configure various behaviours of the CLR, usually for backwards compatibility with legacy behaviours. For example: <configuration> <runtime> <legacyUnhandledExceptionPolicy enabled="true"/> <!-- .NET 2 --> <legacyCorruptedSta...