.net

Can a form tell if there are any modal windows open?

How, being inside the main form of my WinForm app can I tell if there are any modal windows/dialogs open that belong to the main form? ...

How do I get the value (not check or unchecked) of a checkboxlist

I'm working on a winform app and am interating through a checkboxlist to see what's checked. If it's checked, i need to know what it's value member or value property is because I assigned it when I bound the checkbox list. How can I get that? Here's what I have now: for (int i = 0; i < clbIncludes.Items.Count; i++) ...

Does anyone use typed DataSets in .NET?

I have once tried to use typed DateSets in a relatively small production application. Initially it looked like a pretty good idea, but turned out to be different. It was pretty fine for some basic tasks, but as soon as something more advanced was required, it's limitations kicked in and it failed miserably. Luckily the project got cancel...

Appropriate Method of Retrieving Data from a Form.

New to C# and .NET. In a windows application I place a form to query a user for some input. The user fills out the form and presses 'ok'. What is the "correct" or "appropriate" method of retrieving that data from the form? Do forms have a return statement? Do I send a message? Thanks in advance. ...

mySQL stored procedure with .NET connector problem

I've seen other topics that deal with this error but none that seem to correspond to my situation. First of all, my code works completely fine when i run it locally. But when i upload it to the server, i get the error: Parameter '?PuserName' not found in the collection. Here is the C# code: public DataSet GetEmployeeByUsername(strin...

Cross .NET Languages Performances

Hi, Does using Multiple .NET Languages (Delphi, VB.NET, C#) into the same application (but in differents class library of course) can down peformances compared to a full C# application for example ? ...

java for vb.net/c# programmer

Duplicate: http://stackoverflow.com/questions/324554 http://stackoverflow.com/questions/323015 I have been a VB.NET /C# programmer for about 5 years now and I think I want to learn the whole Java/J2EE stuff on my own. Do you guys know of any books/sites that help with this? I have taken several java courses in undergrad/graduate scho...

Why isn't System...Stack<T> implemented as a Linked List?

I was looking through my code and I found a couple of extension methods that I wrote in order to remove items from a System.Collections.Generic.Stack. I was curious, so I looked at the source of Stack with Reflector and I can see that they implemented it as an array instead of a linked list and I'm just wondering why? With a linked list ...

What does the user need to run a WPF browser application?

I've been developing on WinForms and WebForms since the last 4 years. I didn't consider migration to WPF till now, but I am considering it now. Please tell me what's required at the client end to properly run WPF applications in the browser. What are the platforms it's compatible with? Does the user need to install any special plugin? ...

NotImplementedException - are they kidding me?

This really, really urks me, so I hope that someone can give me a reasonable justification for why things are as they are. NotImplementedException. You are pulling my leg, right? No, I'm not going to take the cheap stab at this by saying, "hang on, the method is implemented - it throws a NotImplementedException." Yes, that's right, y...

How can I make a button like 'Digg it' for my website?

Hello, I've got a blogging site hosted on Windows Sever, ASP.Net 3.5, ASP.Net AJAX, SQL Server in background. I want to give bloggers a button like 'digg-it' which they can put on their blogs for the readers to click to thumb-up the post if they like it. I know I'll be using Javascript to do that. What can I do to: - Retrieve code f...

Why does .NET's Conditional Attribute Cause Side-Effects to be Removed?

I read about the Conditional attribute today. According to MSDN: Applying ConditionalAttribute to a method indicates to compilers that a call to the method should not be compiled into Microsoft intermediate language (MSIL) unless the conditional compilation symbol that is associated with ConditionalAttribute is defined. OK. That's ...

What Is The Best Place To Store An Object's XML/CSV/Other Representation

When an object has various formats (XML,CSV) it can be represented in, where should one store knowledge of those formats. Should the object have knowledge of how it's represented in XML (i.e. letting the object convert itself through some method on the object such as GetXML()). Is this too much knowledge for the object and should this b...

How to make a dynamic and intelligent address and time zone contact form

Microsoft's live service has an amazing contact details form in their "Account" > "Registered information" page. You are first asked for your country and the rest of the contact form changes accordingly. For example, if you select "United States", the form fields will change to: Address 1, Address 2, City, State (drop down of US states),...

Differences between Private Fields and Private Properties

Hi, What is the difference between using Private Properties instead of Private Fields private String MyValue { get; set; } // instead of private String _myValue; public void DoSomething() { MyValue = "Test"; // Instead of _myValue = "Test"; } Is there any performance issue ? or just a naming convention ? ...

Howto create classes from Access tables

Is there any way that I can get my .NET classes automatically generated from the Tables in Access. Anything like ORM available? thx in adv ...

How to refresh a simple binding of a windows forms control?

I'm binding a domain objects property to the Text property of a System.Windows.Forms.Label using the DataBindings. Label l = new Label(); l.DataBindings.Add(new Binding("Text",myDomainObject,"MyProperty")); However, when I change the domain object, the Label does not reflect the change. I know that for complex Controls like the DataGr...

Anatomy of an email message

Hi, What are the various parts to an email message? I'm working with these 3rd party components, and so far from what I understand are: emails have unique messageID's (per server I would presume) emails have headers emails have body text that can be either html or plain text. attachments have to be parsed using mime, and each mime pa...

How do I save a stream to a file?

I have a StreamReader object that I initialized with a stream, now I want to save this stream to disk (the stream may be a .gif or .jpg or .pdf). Existing Code: StreamReader sr = new StreamReader(myOtherObject.InputStream); I need to save this to disk (I have the filename). In the future I may want to store this to SQL Server. I h...

How to set current document.domain in WebBrowser Control to avoid "Access is denied"?

How can I set current document.domain in WebBrowser Control to avoid "Access is denied" in Cross-domain calls (XMLHTTP Requests or Iframe/frame access)? I've tried CurrentDocument = WebBrowserControl.Document CurrentDocument.domain = "example.com" Console.writeline("xx" & CurrentDocument.domain) This doesn't work, somehow it never r...