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# > may 2004 > threads for monday may 17

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 31

Cannot parse an en-US date on a non-en-US system!
Posted by Jon Davis at 5/17/2004 11:45:28 PM
I have put my users through so much crap with this bug it is an absolute shame. I have a product that reads/writes RSS 2.0 documents, among other things. The RSS 2.0 spec mandates an en-US style of date formatting (RFC 822). I have been using a variation of RFC 1123 (just change the time zone ...more >>

Enumeration sets
Posted by Nitin Koshy at 5/17/2004 11:11:03 PM
Please tell me there is an option for sets of enumeration in c# !? eg : enum DataKind {dkSimple, dkComplex, dkCool <DataKindSet> = Set of DataKind //Delphi style thoug DataKindSet VariableofDataKindSet = new DataKindSet(dkSimple, dkCool) No ? Alternatives please -Niti ...more >>

Unicode Encoding
Posted by Tom at 5/17/2004 10:56:04 PM
Hi I read http://dotgnu.org/pnetlib-doc/System/Text/UnicodeEncoding.html#UnicodeEncoding.GetBytes%28System.String%29%20Method and here is my code: <code string c = "Hello, How are you today?"; //it should be other language, not English UnicodeEncoding Unicode = new UnicodeEncoding() byte[] ...more >>

Save picturebox's image to stream
Posted by Alexli at 5/17/2004 9:46:01 PM
I got the error ================= An unhandled exception of typ 'System.Runtime.InteropServices.ExternalException' occurred i system.drawing.dl Additional information: A generic error occurred in GDI+ ================= the code like this Image aImg = pictrebox1.Image MemoryStream m...more >>

Anyone have experience w/ Application["AppState"]?
Posted by Julie at 5/17/2004 8:51:13 PM
I stumbled across Application["AppState"] from someone else's code, and I can't find out squat about by searching MS, Google, or Google Groups. For the most part, this is returning the fully-qualified name of the server and path to my application, such as: http://devserver/testapp However...more >>

Get MAC Address
Posted by Aaron at 5/17/2004 8:26:09 PM
How to get a visitor MAC address? Thanks Aaron ...more >>

Hosting Microsoft Word in my program?
Posted by Pengyu Hong at 5/17/2004 8:03:36 PM
Hi, How to embed microsoft word in my program so that the user can edit word files? Thanks a lot, Pengyu...more >>

how to read date from datagrid ??
Posted by Tor Lund at 5/17/2004 7:40:37 PM
hi, i am populating a datagrid with datatables from a dataset. how do i read data's from the datagrid ???. i want to select a number from af table in the datagrid... i know how to do it in asp.net but not in a windows form development.. can anybody help me out ?? thanks Tor Lund ...more >>



Dynamic image in aspx
Posted by Andres Romero at 5/17/2004 7:16:04 PM
I have a Image control in an aspx page with a url static "http://localhost/dir/tmp/test.gif This image changes every time the page is submited (the content not the name). When the page is showed in first time tha image is correct, but when is submited and the image content must change, the first i...more >>

open form in Thread
Posted by LiFo at 5/17/2004 7:13:07 PM
how to open an form in an thread and pass an object in the constructor ?? ...more >>

SQL null problem
Posted by Tommi Bauer at 5/17/2004 7:08:25 PM
I am writing a query in ASP.NET C#, select sum(size) as total_size from my_table where is_valid = 1 However, if there is no data in the database, it returns 1 record with value null. How come it doesn't return 0 instead? because I am using "sum", if SQL can't find any record.. isn't it s...more >>

Timer in a class
Posted by MAY at 5/17/2004 7:05:41 PM
hi, How to enable timer in a custome class, how to override the EventHandler of the timer? Thanks MAY ...more >>

Can remove unused using directive?
Posted by zanac_ NO[at]SPAM hotmail.com at 5/17/2004 7:02:12 PM
How to remove unused using directive? eg) using System; using System.Windows.Forms; <- i want to remove this unused using directive namespace foo { : : }...more >>

Screen Resolution
Posted by Bill English at 5/17/2004 6:46:03 PM
How can i retrieve the users current screen resolution?...more >>

DataTable filtering (Like)
Posted by TA at 5/17/2004 6:24:14 PM
Hi, Does anyone know if it is possible to filter rows in a DataTable by pattern (e.g. Like in SQL) For instance I want to select all rows containing the 'rob' in the name column. Any ideas? - TA ...more >>

How to get HDC object of Printer
Posted by °Ë´óɽÈË at 5/17/2004 6:11:10 PM
Since I need to call Windows API GetDeviceCaps() in C#, I must get HDC object of printer. And I don't like to receive the PrintPage Event because I don't want to print the page, just to get some properties. How can I get it? Thank you! Jerry ...more >>

How to store the string with single quote in Microsoft SQL Server CE 2.0 using C# CF programme
Posted by micmic at 5/17/2004 5:56:02 PM
Deear all experts, In the MySQL, we can use escape character '\' to save the STRING WITH single quote into database (eg. we would like to insert into table "tbl_ABC"with the string ab'c, we can use the following SQL query to insert into database : Insert into tbl_ABC VALUES ('ab\'c'); ). Al...more >>

Regular Expression find and replace?
Posted by Mark at 5/17/2004 4:48:37 PM
Using the Find and Replace in VS.NET, I'm trying to find methods that are in the form .... Foo*[a-zA-Z]*[a-zA-Z][(][)] and I want to replace them with: BarFoo*[a-zA-Z]*[a-zA-Z][(][)] However, put the text above in the Find and Replace respectively replaces EVERY method FooA(), FooB(), ...more >>

about display html file?
Posted by cfyam at 5/17/2004 4:30:58 PM
How can I display and modify the html files in my C# Windows form? ...more >>

Boolean variables or Windows.Forms checkboxes?
Posted by Alex Moskalyuk at 5/17/2004 4:27:27 PM
In the GUI application I am writing I have some checkboxes for various settings. The code right now has internal boolean variables and the events that are fired off on checkBox_CheckedChanged for different checkboxes change those boolean variables, which are later used throughout the program (if...more >>

checkedListBox - new item checked
Posted by Grant at 5/17/2004 4:18:35 PM
Hello, When I am adding things to my checkedListBox - how do I check an item as it is added? In other words I loop through an array adding text to the checkedListBox and when the corresponding value in that array for that text is true, a check mark is added. I cant find any examples on ...more >>

Managing 3 apps
Posted by Diego F. at 5/17/2004 4:05:25 PM
Hi. I need 3 applications working at the same time. The first one is a Pocket PC application, the second is a web service and the third one isn't done yet. This third app is only to receive messages (maybe a Windows Forms application or even an ASP.NET one...) The question is how to send messa...more >>

'System.NotSupportedException' occurred in mscorlib.dll
Posted by mirco.pietrinferno NO[at]SPAM gmx-dot-ch.no-spam.invalid at 5/17/2004 3:59:35 PM
In my code I call following procedure. I use the Compact Framework. string path= System.IO.Directory.GetCurrentDirectory(); I get an expcepiton: 'System.NotSupportedException' occurred in mscorlib.dll Due to the class library this should be avaiable. I use .NET 1.1. Do I need to include s...more >>

Store class in MS SQL
Posted by Champika Nirosh at 5/17/2004 3:11:36 PM
Hi All, Is there a way I can store a serializable class object in a MS SQL data base, note that properties of the class are one to one map with the table attributes. Again is there a way to get the data, from the table, back to the object straight away. Thanks, Nirosh. ...more >>

enable / disable text boxes programmically
Posted by Lloyd at 5/17/2004 2:51:02 PM
How do you make a textbox enabled or disabled ??? i have tried Textbox.disable or enable but the controls apparently dont have this property programmically ??? ...more >>

pause in console apps
Posted by Aaron at 5/17/2004 2:08:23 PM
When you run a console app in VS6 it says "Press any key too continue..." how can i do that in VS.NET2003? thanks ...more >>

MSIL
Posted by Aaron at 5/17/2004 2:00:35 PM
I know when you compile a .NET app c# or vb the code is converted to MSIL. I was just wondering is it 100% reversible? If so, does that mean someone can steal all your source code just by decopiling the dll or exe? Aaron ...more >>

SQL Server CE replication.
Posted by bryja_klaudiusz[at]poczta[dot]fm at 5/17/2004 1:26:23 PM
Hi, How to replicate data between MSDE and SQL Server for CE. -- *Best regards,* Klaudiusz Bryja ...more >>

Mouser coordinate [cont]
Posted by MAY at 5/17/2004 1:16:04 PM
hi, how to make a button move with mouse cursor on a from when mouse down, and stop moving when mouse up. Thx. MAY ...more >>

Get & Set property methods show up in System.Reflection.MethodInfo
Posted by dnlwhite NO[at]SPAM dtgnet.com at 5/17/2004 1:09:00 PM
Does anyone know of a way that you can use System.Reflection.MethodInfo to get a list of methods within a class and NOT have it show the Get and Set methods of properties?...more >>

Image.FromFile
Posted by Mathieu Chavoutier at 5/17/2004 1:07:53 PM
Hi. I want to open an Image. But, I don't know how to do it in a relativ way : I have a directory with pictures : Picture. It is located in my work directory. So, how can I open the image ? For the moment, I have that, and it does not work : Image newImage = Image.FromFile("../Picture/Co...more >>

Append to Existing Attribute Item
Posted by Eric Lemmon at 5/17/2004 12:56:44 PM
Hello C# Gurus, Please excuse my VB mindset. I am writing a class library in C# that is used by a VB ASP.NET app. = When SQL Server detects a data validation exception, I want to use a C# = function within the library to alert the user and send focus to the = offending control. In VB.NE...more >>

Accessing Add Scheduled Task Wizard
Posted by John Bowman at 5/17/2004 12:27:33 PM
Hi, I have a C# app that needs to launch the "Add Scheduled Tasks" wizard found in the control panel "Scheduled Tasks" applet. I realize that this "applet" really just opens the tasks folder, but I need to launch the add tasks wizard inside the folder. Does anyone have any ideas of how to do ...more >>

Device driver in C#?
Posted by Constantin Werner at 5/17/2004 12:12:12 PM
Hello, I want to write a virtual networking adapter, preferably in C#. Is this possible? Or can I only write windows xp device drivers in C / C++? Does anyone know good resources for device driver programming in C# (if possible)? Thank you ...more >>

connection timeout
Posted by C# beginner at 5/17/2004 11:44:56 AM
I'm struggling with a timeout problem today. ConnectionString = "Integrated Security=true;Database=MyDatabase;Data Source=(local); Connection Timeout = 180;"; My connection string is set as above. A stored proc in my code takes about 50 secs. to execute and return. But, I get a connecti...more >>

Is C# a 3GL or 4GL language?
Posted by Mark at 5/17/2004 11:37:30 AM
Is C# a 3GL or 4GL language? Brief justification would be useful. Thanks in advance. Mark ...more >>

default values
Posted by John Wood at 5/17/2004 11:32:41 AM
Even though CSC does its best to detect use of unassigned variables, it often misses it... for example if you just declare a double in a class without assigning a default value, it has a default value of 0 and lets you use it anyway. My question is, how can I retrieve the default value for a g...more >>

Transferring data from a MemoryStream to a string
Posted by Claire at 5/17/2004 11:23:51 AM
I've read some data from the serial port into a memorystream object. Bytes 0..3 of the memorystream data are binary data, the remainder is a unicode string. How do I transfer this data to an instance of a string please? Ive tried the following (where s is a memorystream) s.Position = 4; t...more >>

Tag value for listBox
Posted by Grant at 5/17/2004 10:59:18 AM
Hello, Ive got a listbox which is being populated from a dataset table. When looping through and adding items is there a way to add a tag to the item just added? I am setting the forms binding context to a value and when I select a list box item I need to know that tag id (which is the key...more >>

multidimensional ArrayList
Posted by Al Gorney at 5/17/2004 10:26:03 AM
How do you create a multidimensional array using ArrayList? I'm asking this because I can't have a static size except for the width. The length will continue to grow....more >>

webbrowsercontrol & reflection
Posted by phoenix at 5/17/2004 10:17:42 AM
Hello, I'm using the webbrowser control to display a webpage on my form. The first problem is the gets fired for every image which is completed as well. http://support.microsoft.com/?id=180366 describes a solution but I'm not able to port the if to C# : VB --- Private Sub WebBrowser1_Docu...more >>

resource protection in IIS
Posted by John Wood at 5/17/2004 10:06:56 AM
I know this might be served better in the aspnet forum, but I'm not having much luck with an answer there... I have a couple of questions about asp.net hosted in IIS: 1. If my ASP.net application gets caught in an infinite loop... how does the process ever get terminated? Does it time-out an...more >>

Systereading.Timer class question
Posted by R.A. at 5/17/2004 10:06:41 AM
The follwowing remarks taken from the MSDN: As long as you are using a Timer, you must keep a reference to it. As with any managed object, a Timer is subject to garbage collection when there are no references to it. The fact that a Timer is still active does not prevent it from being collect...more >>

set a buttons property to visible
Posted by Lane at 5/17/2004 10:01:04 AM
Im trying to make a linkbutton visible in a if / else statement, but i cant seem to find the syntax to make it work. ...more >>

Datalist error again
Posted by Dharmen at 5/17/2004 9:41:54 AM
Hey Guys, I know some of u guys tried to help me but it didnt work.... I have a SQL Database from which im trying to display some data! I'm using this SqlCommand: SqlCommand sqlCmd2 =new SqlCommand("SELECT x FROM ytable WHERE z="+this.ddList1.SelectedItem.Text.ToString(),conn); It reads the ...more >>

best way to reverse bit order of data type ?
Posted by Laszlo Szijarto at 5/17/2004 9:29:32 AM
In C#, wha't the best way to reveser the bit order of a data type and then convert it back to that datatype? So, take a byte, reverse bits, convert it back to a byte. I tried to get a BitArray and then call Array.Reverse(), but how to convert back to byte? How about flipping an odd number o...more >>

__DATE__ and __FILE__ equivalents.
Posted by Jeffrey Bradshaw at 5/17/2004 9:14:09 AM
Are there compile date/time and file line equivalents for __DATE__ and __FILE__ in C#? ...more >>

Calling explicity interface implementation from a subclass
Posted by Keith Patrick at 5/17/2004 7:50:22 AM
Could someone tell me if it's possible (and if so, how) to call an explicitly-implemented interface method from a subclass? I have a class in which I have to explicity implement some methods, but my subclasses, which should use them, cannot call them. I'm not sure if it just isn't possible due...more >>

Regular expressions duplicates
Posted by nick_tucker NO[at]SPAM hotmail.com at 5/17/2004 7:32:34 AM
Hi, I have a list of comma sepertaed numbers e.g. 287,456,287,876,877,877 I want to use regualr expressions to numbers appear once and only once in the list i.e. for the example above.... 287,456,876,877 can any one help me with the pattern and commands that I should use. Than...more >>

Extreme situations.
Posted by Alex at 5/17/2004 6:26:28 AM
this.this.this.this... The compiler wont let us do that ;-) ...more >>

What parts of .NET framework is my code using?
Posted by newsivan NO[at]SPAM correu.vilaweb.com at 5/17/2004 6:11:51 AM
I would like to get the summary of namespaces, classes, interfaces, methods and members used being used in my code. Is there a tool I can use to get that information? I want to compare that summary to the Mono Class Status list: http://www.go-mono.com/class-status.html The aim is to know ...more >>

Deedback on .NET Coding Best Practices
Posted by scuba49 NO[at]SPAM hotmail.com at 5/17/2004 6:05:35 AM
Hello, Can I get feedback on these .NET coding best practices please. Thanks to Konrad Rudolph and Jon Skeet for the replies to my previous post on 'Writing Properties.' Thanks in advance to all replies to this post as well, as I am having probs posting from MS Communities site (posting from ...more >>

broken link between aspx file and aspx.cs file
Posted by dan12345 at 5/17/2004 5:45:40 AM
I used 'save as' on my aspx.cs file, which broke the link between it and it's aspx file. Restoring everyting to it's previous state and checking the 'codebehind' properties of the aspx file have not fixed it. changing the namespace names also did not help - is this a known bug? Everything ...more >>

Wrapping text in DataGridTextBoxColumn
Posted by Sangeetha at 5/17/2004 5:16:05 AM
I have a datagrid column which I want to expand when i type in some text. Initially I tried increasing the column width on the key down event of that DataGridTextBoxColumn, but it didn't work out as expected. Now, I am trying to increase the height of the row to make it as a multiline column. priv...more >>

CLI Marshaling
Posted by Nadav at 5/17/2004 5:06:02 AM
Hi I am about to write a performance crutial system, I am considering writing this system based on native COM or unmanaged C++ exposed as CLI, Now, I Wonder... does exposing a native code through CLI ( using a mixed mode DLL ) have any performance penalty? consider one Native C++ CLI assembly call...more >>

About Event Handlers, Delegates and Scopes
Posted by Alex at 5/17/2004 4:26:06 AM
1. Can an event handler access a private method or member of a class? 2. If so.. is that a language conceptual error? Best regards, Alejandro Penate-Diaz. ...more >>

retrieve image datatype and store it as a file
Posted by kabin selvam at 5/17/2004 4:19:32 AM
Hi, my scenario is like this, I have my document (word.or excel or pdf) stored a s a binary value(image datatype) in database, I need it to convert back into thedocument and save it as the file in my local system, Is there any way of retrieving the image datatype and store it as a file...more >>

Lets Try Again, Writing Properties
Posted by scuba49 NO[at]SPAM hotmail.com at 5/17/2004 4:14:02 AM
What does everybody think of the below: ========================================== Writing Properties In C# name the property name should "shadow" the private variable name that it represents differing only by case; Colour and colour for example. But this would only apply when the variable that...more >>

Writing Properties
Posted by scuba49 NO[at]SPAM hotmail.com at 5/17/2004 4:11:26 AM
6.10 Writing Properties In C# name the property name should "shadow" the private variable name that it represents differing only by case; Colour and colour for example. But this would only apply when the variable that the property represents is private, otherwise case-insensitive languages like ...more >>

Help never goes to MSDN
Posted by John Baro at 5/17/2004 3:35:15 AM
I have VS 2k2 installed with help set to external collection (MSDN April 04). Always when I press F1 in the IDE it goes to the Combined collection and I cannot find out how to fix it. Any ideas appreciated. Cheers JB ...more >>

Determine height of text wrapped in label
Posted by John Baro at 5/17/2004 3:30:15 AM
If I have a label (AutoSize = false) with more text than can fit it wraps downwards. I need to determine how high the label needs to be to fit the whole of the text in. I can then put it into a scrolling panel and scroll it like a textbox. Any ideas on how to do this or a more appropriate metho...more >>

what is this called
Posted by Aaron at 5/17/2004 2:38:45 AM
[Test] //<<<<<<<<<<<<this public void TestEncrypt() { string data = "This fox ran up the hill."; string encrypted = Crypt.Encrypt(data); Assertion.Assert(!data.Equals(encrypted)); } why does some method have [***] above them? what does it do? Thanks, Aaron ...more >>

Basics...
Posted by DC at 5/17/2004 12:23:40 AM
Hi! Is code like: <code> FormX f = new FormX(); f.ShowDialog(); f.Dispose(); GC.Collect(); </code> bad thing or good thing? Thanks, Dejan...more >>

Configuration Error
Posted by Das at 5/17/2004 12:06:03 AM
Hi I'm using C# Asp.NEt application. All of suddent it has started giving me erro Can anyone tell me what might be the reaso Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details...more >>


DevelopmentNow Blog