.net

How to handle progress events with GeckoFX

I want to be able to display the page loading status (i.e. waiting for server, downloading page, etc) using GeckoFX. The Navigating event is perfect for letting me know when a page has started loading, but I need to know when it is finished loading. I know the GeckoWebBrowser class has an IsBusy property. I could run a timer and to che...

xs:key, why is validation passing when key value is not member of key reference?

Hello SO, I am interested in defining a key constraint in my Xsd. It is my understanding that using xs:key should constrain the value used to a member of a referenced list of values. Assuming we are using the sample Xsd, <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="namespace1" xmlns:r...

How to create function which lets you choose one of 3 parameters values?

So I have string returnType which a developer can choose to = to JSON , XML or PRINT_R. How to limit his choice and make VS 2008 or later suggest him what value (from that 3) string returnType can be? (.net 3.5) ...

"Collection was modified; enumeration operation may not execute." on form disposal.

"Collection was modified; enumeration operation may not execute." appears to be a common error with foreach loops, but I can't figure mine out. I have two classes of forms. One is begun on startup, and a button creates new instances of the second form, and displays them. When I close the secondary forms, I get an InvalidOperationExceptio...

"wait window nowait" in .NET

Is there something similar to "wait window nowait" in Windows Forms (.NET VS2008) ? This is a commonly used sentence in Visual FoxPro for debugging purposes and "quick and dirty" thermometers. ...

How to: generate UnhandledException?

I use this code to catch the WinForm application UnhandledException. [STAThread] static void Main(string[] args) { // Add the event handler for handling UI thread exceptions to the event. Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); // Set the unhandled ...

Style and coding practice for a very weakly typed language

I am using a proprietary language called VGL which really does not type variables at all. For Example I could Declare variables as such: DECLARE thisvariable, thatvariable, anothervariable all three of the above variables can be used in any different way I choose, string, integer, character, float, Boolean etc... The product in it's n...

Binary serialization and deserialization without creating files (via strings)

Hi, I'm trying to create a class that will contain functions for serializing/deserializing objects to/from string. That's what it looks like now: public class BinarySerialization { public static string SerializeObject(object o) { string result = ""; if ((o.GetType().Attributes & TypeAttribut...

XmlSerializer: The string '' is not a valid AllXsd value.

I'm getting this message,"The string '7/22/2006 12:00:00 AM' is not a valid AllXsd value.", when deserializing an XML, the element contains a date, this is the property that is supposed to be mapped to the element: [XmlElement("FEC_INICIO_REL",typeof(DateTime))] public DateTime? FechaInicioRelacion { get; set; } Am I doing something w...

Artificial intelligence in c sharp

Hello everyone, I would like to add an artificial intelligence technique in a c sharp project. The problem is that i don't know an artificial intelligence library that i can use. Could you please share your knowledge with me. ...

Does .NET have a built in IEnumerable for multiple collections?

I need an easy way to iterate over multiple collections without actually merging them, and I couldn't find anything built into .NET that looks like it does that. It feels like this should be a somewhat common situation. I don't want to reinvent the wheel. Is there anything built in that does something like this: public class MultiCol...

How to Remove Last digit of String in .Net?

I want to eliminate B if i scan Serial number bar code: 21524116476CA2006765B Output: 21524116476CA2006765 ...

NHibernate custom connection string configuration

I have a c# library project, that i configured using nhibernate, and I like people to be able to import this project and use the project. This project has FrontController that does all the work. I have a connection string in hibernate config file and in app.config file of another project. it would be nice for anyone to be able to set t...

Force an OleDbConnection to Release a File Handle

Related Question My code doesn't release a file handle even after I call dispose to an initialized OleDbException. Is there a way to explicitly force the program to release a file handle? ...

Iterating through tooltips

Guys, I have a windows form with a panel control and inside the panel control are several other controls with a System.Windows.Forms.Tooltip attached to them. How can I iterate through each tooltip and set the Active property of the tooltip to false? Tooltips, unlike other controls, are not actually controls. So I had this: foreach (Sys...

Get newly created window using Win32 API hooks

This may be a long short or not even possible but no harm in asking. What I am trying to do is monitor an application for any new windows it creates in its MDI control. I have implemented hooking in C# and can capture the MDICREATE window message but because I need to get information about the window after is has been created the MDI...

Override ASP Master Page html in a single content page?

Hi, I'm using ASP Master pages, and I would like to add an "onkeypress" event handler to the <body> in the Master page, but only for a single page. How do I do this? Obiwanke-stackoverflow, you're my only hope. -Alan ...

how do I get the index of a firing context menu item

I would like to determine the index of the selected context menu item. But I don't want to build a unique eventhandler for each menu item...how do I do this MenuItem mi= StatusContextMenu.MenuItems.Add("Set option"); mi.MenuItems.Add(0,new MenuItem("Set to A", new EventHandler(SetLetter)) ); mi.MenuItems.Add(1,new MenuItem("Set to...

Authenticate username and password

I have a MMC client that runs on a .Net system, that invokes web methods on a server running on a linux box. The first task the client needs to do is to perform user login. It prompts the user for username and password. What is the best way for the client to authenticate the user's credentials. The password cannot be sent as plain te...

Spreadsheet component with VBA support

I am looking for a .Net spreadsheet component that could also execute the VBA contained in Excel files. I found Spreadsheet Gears to be very nice for manipulating and allowing the user to edit Excel files, but on spreadsheets that use VBA for calculations, well, these don't work. So, apart from Excel itself, are there any other compone...