Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008


all groups > c# > september 2007 > threads for tuesday september 4

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

formula for calculating the R, G, B components in a gradient
Posted by Victor at 9/4/2007 10:20:20 PM
Can someone help me with the formula(s) to calculate the RGB components for a gradient from green to red? I'm trying to display a nice graphic with a gradient that reflects the profit or loss and I can calculate the value of red or green at each point based on the value of the profit or loss, bu...more >>

HttpListener based app loading Java Applet into html page
Posted by Reg at 9/4/2007 9:23:09 PM
I have a following code in HttpRequestListener's ProcessRequest method which is a Windows Console Application. I'm trying to read html page with browser (Opera) and html file contains tags to include Java Applet jar too, for (int i = 0; i < numRequestsToBeHandled; i++) { HttpListene...more >>

Robustly detecting an error when starting an app via code
Posted by Simon at 9/4/2007 8:26:21 PM
Hi everyone, Can anyone tell me if there is a standard way of detecting an error in a process that I've started using the .net framework's System.Diagnostics.Process class? I need to regularly call a secondary application but be able to tell if a problem has occured with it and log the e...more >>

Need help for xml schema
Posted by at 9/4/2007 8:17:33 PM
I had develop an xml schema for checking type of data as <xs:simpleType name="O_FMExchangeRate" xmlns:xs="http:// www.w3.org/2001/XMLSchema"> <xs:restriction base="xs:float"> <xs:minExclusive value="0.0000001"/> <xs:pattern value="d(0)|\d{1,5}|\d{1,5}\.\d{1,7}|\.\d{1,7}| \d{1,5}\...more >>

Control windows explorer and his function
Posted by Franck at 9/4/2007 8:16:07 PM
I'm basicly a Vb6 dev but i actually have to play around with c# alot more. I have studied C# at school at beginner/intermediate level so i understand the bases. I'm working on a project that i need to open windows explorer on a folder X. That i managed to do it with : System.Diagnostics.Process...more >>

How to Get Element Type of an Array Object?
Posted by Laser Lu at 9/4/2007 7:59:55 PM
If I get an object with its type declared as Sysem.Array(not in the explicit form like 'ElementType[]' in C#), then how to retrieve the exact element type of that array? ...more >>

Question about Extending a Typed DataSet Using Partial Classes
Posted by Calvin at 9/4/2007 7:08:00 PM
Dear all, I had used partial class to extend typed dataset(ex. add a method to TypedDataTable) in my windows-base applications and it works well. But when I try it in a web services project, those extend functions which is visible within web project, but invisible to client.(I create a windo...more >>

design advise selecting object for webservice methods
Posted by dan655t NO[at]SPAM gmail.com at 9/4/2007 6:43:32 PM
Hello, I've come here to get some advise from the experts. Currently I am tasked with modifying a web service that currently supports one product to support multiple products. It needs to be backwards compatible so other products still work with the same method calls and the new products need...more >>



DataGridViewRow Clone
Posted by Chris Shepherd at 9/4/2007 4:49:18 PM
Here's the scenario: I have a form, with an unknown dataset (could be ObjectDataSource, DataTable, etc.) which populates a DataGridView. I need to cache prior values from a row on the DataGridView before updating them with current values from the DB, and then do some specific things if part...more >>

System.Diagnostics.Process.Start async callback?
Posted by Twistfactory NO[at]SPAM gmail.com at 9/4/2007 4:04:55 PM
Hi all, Is there some way to execute an external process that will execute asynchronously and then notify me when it's completed? Any sort of a callback or class member that I could check periodically to see if it's still running would work. The reason for this is that the external process wi...more >>

Generic recursiveness
Posted by Michael Bray at 9/4/2007 3:53:17 PM
Lets say I want to have a sparse lookup by two int values to a string value... I can do it by: Dictionary<int, Dictionary<int, string>> d = new ... d[4953][1344] = "hello"; This is fine if there is only two levels... but I have a situation where I want to declare one with more levels, ...more >>

Can anyone please tell me why my app's performance under WCF is so poor?
Posted by Ronald S. Cook at 9/4/2007 2:43:29 PM
Performance in our WCF application is very poor now that we've added a number of records to tables (not an unrealistic number, though). After doing that, we did get "max message size" errors to I bumped that number to 99999999 (see below). Can anyone please tell me if (1) my config files b...more >>

using disposing object
Posted by Jure Bogataj at 9/4/2007 2:38:15 PM
Hello! I'm using .NET 2005 (C#) and I've come across using statement. It seems ok, I was just wondering one thing. What if I returned object inside using statement using RETURN directive. Is returned object valid or not? For example: public FileStream Func1() { ... using (FileStre...more >>

parse a web page in ASP using c#
Posted by Joseph Millman at 9/4/2007 12:57:55 PM
I'm attempting to write a function that grabs a page from a web server and reads it into either a string or a HTML or XML object that can be parsed to retrieve the desired bits of data. My immediate use is in an ASP or ASP.NET page, but I have a need for the same sort of functionality to autom...more >>

Capture do html code in the web.
Posted by Antônio_José_Formiga_Neves at 9/4/2007 12:36:39 PM
I need to capture the HTML's code for any page in the web. Anyone can help me? thks...more >>

Coding Practice Question - Usage of System.EventArgs
Posted by Frankie at 9/4/2007 12:30:31 PM
The .NET Framework provides us with built-in event handlers: System.EventHandler and the generic System.EventArgs<TEventArgs> It appears that those built-in event handler delegates are just a convenience for us, as we can use those instead of creating a new delegate for every event ...more >>

strange compilation warning
Posted by Andy Fish at 9/4/2007 12:30:05 PM
The following code: enum Foo { one, two }; int Bar(Foo foo) { switch (foo) { case Foo.one: return 7; case Foo.two: return 4; } } gives a compilation warning "not all paths return a value" surely this is spurious though? - there is no path I c...more >>

Exception SmtpClient
Posted by Torsten at 9/4/2007 12:28:00 PM
Hi, I have a problem sending mails with the SmtpClient class. It's strange - after I boot the pc and start the program I can send mails many times. After I close the program and start it again it sometimes works too, but often does not. If it does not, he will never - until the next reboot....more >>

using OpenText() to open a file that is opened(locked) by others
Posted by MCH at 9/4/2007 11:50:00 AM
I try to open a log file that is logging infomation by another process: StreamReader sr = File.OpenText(filePath); I got the exception message: The process cannot access the file 'c:\temp\myLog.txt' because it is being used by another process. How can I open, read and process the file ...more >>

Math Library
Posted by raju at 9/4/2007 11:12:00 AM
I am unable to find System.Math Library. How to add it. I am trying find squre root of a number...more >>

dataset and sort
Posted by Sehboo at 9/4/2007 10:55:25 AM
I call a stored procedure and get the data in dataset then I do this to sort my data myDS.Tables[0].Select("" , "terminal DESC"); but it doesn't sort. If I put something in filter then it totally ignors that as well...am I missing something? ...more >>

How to tell if Anti Virus is installed.
Posted by Mufasa at 9/4/2007 10:39:46 AM
Window's has a way to tell if Anti Virus is installed ( or at least appears to - when it's not installed - it tells you ). How can I do the same check? I just want to know if AV is installed. TIA - J. ...more >>

so long? no other way?
Posted by vinnie at 9/4/2007 7:48:18 AM
I'm a self learner, and i'm trying to figure out how this code should work. What is not clear to me, is why the function InsertNumber is called 3 times: wasn;t easier to call it just once and put all together? There is a call to that function at line 8, 13, 17 1 namespace ripro...more >>

Changing Project directory name.
Posted by Sin Jeong-hun at 9/4/2007 7:39:53 AM
In Visual Studio, I can change the name of the solution, project and other source file names. But the problem is, actual sub folder name for the project is determined at the creation of the project. As for now, I manually open sln file with Notepad, and edit the directory name, and rename the d...more >>

no title bar but still have window caption for alt-tab
Posted by jay.meerdink NO[at]SPAM gmail.com at 9/4/2007 7:23:39 AM
Is there a way to set the text for a window, but not paint the title bar? I can set the text to nothing and turn off the control box to prevent the title bar from rendering, but then there's no text for the program in the taskbar or in alt-tab. And as soon as I specify text for the window capt...more >>

Implementing Tree
Posted by csharpula csharp at 9/4/2007 4:51:31 AM
Hello , I would like to build a tree structure in c# using the arraylist or hash table. what is the best way to implement it if I want to add children and to print my tree. Thank you! *** Sent via Developersdex http://www.developersdex.com ***...more >>

OleDbProvider/ProviderType
Posted by AA2e72E at 9/4/2007 4:02:04 AM
I am retrieving table schemas for given tables; the information returns the following items of informatin for every column in the table: ColumnName ColumnOrdinal ColumnSize NumericPrecision NumericScale DataType ProviderType IsLong AllowDBNull IsReadOnly IsRowVersion IsUnique IsKey ...more >>

Is Enterprise Library the successor to Enterprise Services?
Posted by Ben at 9/4/2007 12:50:03 AM
Hi, I was wondering whether the Enterprise Library replaces Enterprise Services as a framework for providing services for enterprise apps, or it supplements it. I know nothing of either of these technologies, but from just looking at their feature set, I noticed that they don't exactly sha...more >>

FromImage loading smaller version of image with wrong size
Posted by Jon Slaughter at 9/4/2007 12:05:06 AM
I am trying to load an image using From image. All the code work(even a simple test version such as Bitmap bitmap; public Form1() { InitializeComponent(); bitmap = (Bitmap)Bitmap.FromFile(@"C:\Documents and Settings\Jon\My Documents\Visual Studio 2005\Projects\BMTest1\BMTest1\Eart...more >>

What is the purpose of the @ Character?
Posted by Mick Walker at 9/4/2007 12:00:00 AM
Hi All, I have seen the '@' character used with strings on several occasions. Comming from a vb background I am not sure what this actually does. i.e: string strScript = @'alert(document.forms[0]['Textbox1'].value);"; What is the purpose of the '@' character in this line, because as far...more >>

How do I get information about the version of windows I'm running?
Posted by Claire at 9/4/2007 12:00:00 AM
I need to read data from one of two file locations depending on whether the application is hosted on Vista or an older version of windows. On older systems its on a subdirectory of the application, on Vista on commonapplicationdata. How do I query windows version please? thank you Claire ...more >>


DevelopmentNow Blog