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# > july 2005 > threads for monday july 18

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

Load text into textbox (Delphi-style)
Posted by Chris at 7/18/2005 10:28:14 PM
Hi, In Delphi there is the possibilty to load a textfile into a textfield (memo) without writing too much code. It goes like memo1.Lines.LoadFromFile('myfile.txt'); What is the C# equivalent (without making use of a streamreader)? Cheers, Chris...more >>

Read text file bottom up
Posted by Lam at 7/18/2005 9:58:37 PM
Hi the default readline method in StreamReader read the text from the top to bottom how can I read a text file from the bottom to the top? Thanks ...more >>

Function params
Posted by David Dvali at 7/18/2005 9:27:17 PM
Does C# support this: void myFunction(int x, y) { ... } instead of: void myFunction(int x, int y) { ... } ...more >>

Service App not Starting
Posted by wg at 7/18/2005 8:43:44 PM
I have created a windows service application that runs fine on my deveopment PC but when I install it on a W2K machine (SP4) it will not start, it give me a 1053 in about 3 seconds. I changed the service to logon and use the desktop, takes a little longer but fails. I have cleaned up OnStart w...more >>

Refresh the output
Posted by Lam at 7/18/2005 8:34:05 PM
Hi I try to write a C# windows program which will read some data from database and display on the screen. It has to refresh the output every 10 seconds because the database keep growing every seconds. so how can I do the refresh? Thanks ...more >>

Incorrect DateTime.Now when saved to SQL
Posted by John J. Hughes II at 7/18/2005 6:12:02 PM
I have several functions that save the time when they did certain tasks to an SQL table. This was working fine as far as I could tell but I now have systems that are updating thousands of records and a very small percentage are showing as future dates by seconds to hours. As a guess I would ...more >>

FINDING CONTROL
Posted by Jose Fernandez at 7/18/2005 6:05:40 PM
Hello I have a winforms with 5 controls. 2 of them, with the Name by default, the rest, I changed the names. When I perform this foreach(Control c in Controls) it only finds the 2 controls with their default names. The other 3 are not listed. How can I find these controls??? Thanks in...more >>

Interface Delimma
Posted by James Curran at 7/18/2005 6:01:18 PM
We are in the process of design a new of classes which are essenially E/R object for our db tables. Each would have the standard CRUD operations. We plan to have a common interface that they all implement, basically: interface MyInterface { Read(int id); Update(i...more >>



Saving XmlDocument object to client computer as a file
Posted by Throne Software at 7/18/2005 5:30:37 PM
I am working on a ASP .Net page with a C# back end that displays, and give the option to save, an XmlDocument object. While displaying the XML in a literal was easy, I can't figure out how to allow the user to save the XmlDocument as a file without creating an XML file on the server. It is impor...more >>

How best to load an image resource?
Posted by Robert W. at 7/18/2005 5:03:02 PM
I want to create a special DLL that will contain only images. My application will then load these images when it needs them. So I searched MSDN and found this article: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskEmbeddingImageResourcesInProject.asp I f...more >>

Trying to debug an exception
Posted by Frank Rizzo at 7/18/2005 4:42:12 PM
Hello. Every now and then (it's rare), i get an exception when calling SqlDataAdapter.Fill. The code is calling a stored procedure and attempts to stuff the results into a dataset. It yields the following exception. I am trying to understand what the exception is actually complaining abo...more >>

C# Telnet Server
Posted by Steve Koon at 7/18/2005 3:35:38 PM
Anyone know of a C# telnet server code that I can look at. I want to integrate a telnet server function inside a application that I am writing. Thanks, ...more >>

Transparent Controls
Posted by Steve Koon at 7/18/2005 3:31:23 PM
Any thoughts on getting this project to work or suggesting another method would be appreciated. Steve ========================================== Project: A Windows Form which acts as a Whiteboard. The Form contains 3 layered UserControls. The upper most control frame is t...more >>

JavaScript before postback a page with asp:button
Posted by Andres Romero at 7/18/2005 3:21:04 PM
I have an aspx page and I need that when the user press a Submit button it first executes a javascript function to validate some input information, if the validation pass continue with the postback, if it isn't stay in the page. SOme help?...more >>

Regular Expression
Posted by asadikhan NO[at]SPAM gmail.com at 7/18/2005 3:06:29 PM
Hi, I want to create a regular expression. I have come up with something like this: Scan*ValRel(QualValRel)* which basically means that I should see: zero or more of "Scan" exactly one of "Val" exactly one of "Rel" zero or more of "ScanValRel" however I can't seem to get this righ...more >>

how to correlate business objects against tables
Posted by hazz at 7/18/2005 3:03:35 PM
I have a Customer table and an Inquiry table. I have a few fields in the Customer table which I want to include when I instantiate and hydrate a business object which I use for business logic and whose properties update the corresponding table(s) column values at the end of the method/event...more >>

The delegate must have only one target??
Posted by Ed A at 7/18/2005 2:58:03 PM
Hi all: My class has one event that gets fired on a timer, typically only one function consumes it on the receiving end. // Source Class public delegate void DataHandler(ArrayList aList); public event DataHandler DataEvent; ... ... DataEvent.BeginInvoke(new ArrayList(),null,null)...more >>

Creating Multiple Windows Services
Posted by Al at 7/18/2005 2:34:02 PM
I have a single project that contains 8 different windows services. There is a seperate installation project in the solution for the Windows Services. Both projects build fine with no errors. The installation project installs the services without any errors. When I open the Computer Manage...more >>

Treeview
Posted by Alvo von Cossel I at 7/18/2005 1:57:04 PM
hi, i have a treeview control and a textbox. the treeview has lotsof different nodes in it (i'm making a dictionary). i want a node to be selected and the definition is in the textbox. i cannot, however, create a click event for a node, just the treeview itself how do i do this? -- ...more >>

Open new browser window, not on top
Posted by Jon Angel at 7/18/2005 1:50:01 PM
I'm relatively new to C# and need to maintain an application that opens a new browser window with a URL like this: "JavaScript:window.open(popupRpts.aspx','popupRpts','width=810,height=600,resizable = yes,scrollbars = yes,toolbar = yes,menubar = yes');" It works, but the calling window, whic...more >>

attaching files
Posted by Newbie at 7/18/2005 1:41:06 PM
i have a c# asp.net webform and i need to allow the user to select a file in his hard drive for attachment. a good example is yahoo's email where the user can send attachments. when the user clicks the "Browse" button, a dialog or window should pop up and the user can navigate to the file. aft...more >>

Graphics.DrawImage consuming more memory ???
Posted by Aravind at 7/18/2005 12:25:24 PM
Hi, I am trying to create a image object out of a bitmap file like Image img = new Bitmap(@"c-\CurDisplayImage.bmp"); ,I found the memory of the process is increased twice as the bitmap size , for example if I load a 50MB bitmap the memory is increased by 100MB , Also when I draw the image wi...more >>

Does Console.Write() work in Compact Framework?
Posted by brett at 7/18/2005 12:18:08 PM
When I do Console.Write("something here") or WriteLine() on the Compact Framework, nothing appears in the output window. I have also tried it on another developer's machine with the same results. The Docs say this is supported in the Compact Framework. Any ideas? Thanks, Brett ...more >>

model for dymanically built web pages...
Posted by Dan Bass at 7/18/2005 11:51:26 AM
In short, I'm looking for a way to take in an XML file, which tells me the controls on a page, then generate this page for the client who requested it. I'm using ASP.Net 2.0 beta 2, or 1.1 (c#), which ever is more appropriate... Is there an existing model for doing this? I was thinking, th...more >>

String Tokenize
Posted by Lam at 7/18/2005 11:49:46 AM
Hi I try to read in a line from text file, and how can I tokenize the line? Thanks ...more >>

special characters
Posted by JustCoding at 7/18/2005 11:43:38 AM
In C# how can I check for non-numeric characters in a file? example: if the file has !@#$%^ in it, how can I check for that and create an error message for that file? ...more >>

Datagrid, ArrayList, and columns
Posted by Carolyn Vo at 7/18/2005 11:41:06 AM
Hi, I have created a class that extends the DataGrid class, and I want my class to show a table that has as its data an ArrayList of ListNode objects. Each ListNode has an id, name, and description associated with it. I want the columns in the table to show as headers "ID", "Name", and "D...more >>

autosize DataGrid column
Posted by Tim Wallace at 7/18/2005 11:32:41 AM
I'm using Visual Studio 2003. Is there a way one can cause columns in a DataGrid to autosize? Also, is there a way to cause the last column to take up the remaining space between the end of the column and the right edge of the DataGrid? And finally, is there a way to remove the row that per...more >>

How to convert string (#&dddd) to unicode character
Posted by ghostnguyen at 7/18/2005 11:11:08 AM
Hi all I read data from a website and encoding in UTF8. So the result I had like this: và resumes trực tiế How can convert the "ự" (and these string like this) to Unicode character. Thanks ...more >>

Simple Question about Namespaces...
Posted by Charlie NO[at]SPAM NISH at 7/18/2005 11:04:48 AM
Hi: If I have namespaces like "CompanyX.Data" and "CompanyX.Data.ClientTools". Does this mean that classes in ClientTools inherit classes in Data? Thanks, Charlie ...more >>

Memory leaks in managed code?
Posted by Kev at 7/18/2005 11:04:17 AM
I've been trying to understand the article "Identifying Memory Leaks in the Common Language Runtime" listed on http://support.microsoft.com/?id=318263 It says "The garbage collector can collect and free the memory but never returns it to the operating system. This occurs when the garbage ...more >>

TreeNode Interface
Posted by humble.apprentice at 7/18/2005 9:16:13 AM
Hi guys, Don't you guys think that creating an interface for TreeNode can be of help to programmers? The thing is that my current project involves a TreeView, ListBoxes and a PropertyGrid. I can pass objects to both the PropertyGrid and ListBox but I can't do that to the TreeView so we thou...more >>

How to convert DataTable to Base64?
Posted by Rodusa at 7/18/2005 9:09:18 AM
I am looking for an example of how to save a DataTable into Base64 and vice-versa. I tried using Convert.ToBase64String(), but it says that it cannot convert DataTable to byte[]. Any help or pointing would be appreciated. Thanks Rod ...more >>

Custom Controls in Toolbox
Posted by Dennis at 7/18/2005 8:32:02 AM
Hi all. How do I get my custom controls to automatically show up in the Toolbox when my assembly is referenced? Thanks. Dennis...more >>

TextBox GetPositionFromCharIndex
Posted by john doe at 7/18/2005 8:01:27 AM
I'm trying to implement the GetPositionFromCharIndex for a TextBox. As all the RichTextBox uses is the windows api EM_POSFROMCHAR SendMessage call, it looks like quite an easy thing to do, however my call never populates my Point object. Here's the code: [DllImport("User32.dll")] public stati...more >>

Counting the number of subscribers to a controls events
Posted by Steve Wilkinson at 7/18/2005 7:52:05 AM
Is there any method I can use to determine the number of subscribers to a controls events. In particular I'm looking at the ComboBox.SelectedIndexChanged event, I have a scenario where I need to cancel the SelectedIndexChanged event and restore the original SelectedIndex property. To do ...more >>

Webservice and browser
Posted by Ravi at 7/18/2005 7:06:02 AM
Hi, I have a small HTML page which posts requests to a web service. I am using a IFRAME for that so that the entire page wont reload. All is working fine except that the respose from the web service changes once it reaches the client. i.e it adds all javascript for handling + and - event...more >>

regular expression to extract elements from url
Posted by jarod1701 NO[at]SPAM gmx.de at 7/18/2005 6:37:39 AM
Hi, I'm currently trying to create a regular expression that can extract certain elements from a url. The url will be of the following form: http://user:pass@www.sitename.com I want a regex that matches the "user" part of that url. My first approach was ([:][/][/]([a-z]*)[:]) but that ...more >>

Accessing data in multiple tables within a dataset
Posted by Moojjoo at 7/18/2005 6:29:04 AM
Good Monday Morning: I am at a dead stop and I am hoping some other developers out there can help me out. I have built a dataset that first contains a table populated from SQL Server then I am adding another table that is built from the same Query and data from active directory. I have bu...more >>

Empty string
Posted by M D at 7/18/2005 6:00:23 AM
You know how you assume you know until you find out you don't know. Well, I typed into a function definition "..., new String("")). I know what I want. Everyone reading this knows what I want. However, the 1.0 compiler has no idea what I want. Can anyone share with me the syntax that wil...more >>

How to resume thread?
Posted by TOMERDR at 7/18/2005 5:12:17 AM
Hi, I have a sync manager class which span a thread which run a tight loop(Sync function) I would like that after the loop is finished,every 5 minutes the thread will run again I want also the ability to stop the thread in the middle of the loop Is it ok to just use a timer in the SyncM...more >>

Active are for controls
Posted by Amey at 7/18/2005 5:02:05 AM
How to develop (or which existing control to use) an active area where a user can place controls (similar to command buttons in VB), resize them, rotate them and also being able to zoom-in and out the active area. The active area should also be saved. ...more >>

XML question
Posted by r0ddick at 7/18/2005 3:33:27 AM
hi! i have a "little" problem. i need to make a parser that will activate active-x control using c# and xml. i'm supposed to write a simple program in xml tht will have its var's and if/then loops and my parser is supposed to recognize them and activate the control acoringly.. now activatei...more >>

Test connection with internet
Posted by Ricardo Luceac at 7/18/2005 2:57:25 AM
HI... I'm making a program to test f my connection to the internet was alive... I think of make a webrequest and ersponse, but even if my connection is down doesn't I get a response??? The error 404... Does you all have an Idea how can I do that??? thx... *** Sent via Developersd...more >>

Line breaks in text boxes
Posted by Alvo von Cossel I at 7/18/2005 1:53:02 AM
hi, i have a button and when it is clicked, a textbox's text will change. the text, however has line breaks in it. here is my code for the button's click event: textBox1.Text = "You clicked the button!\n\n\n\n\nif you exit the application (Alt+F4), you can click the button again!"; th...more >>

Event question
Posted by Rainer Queck at 7/18/2005 12:00:00 AM
Hi, in a base class I have declared the following event handler: public abstract class MyBaseClass : :MarshalByRefObject { ..... public event EventHandler OnMsgSent; .... } In a derived class I try to call this event in the following way: public override void MsgSent() { i...more >>

Newbie: namespace query
Posted by MM at 7/18/2005 12:00:00 AM
Hi, Okay, I think I understand nested namespaces in the same c# file. But how do you 'nest' across multiple source files? eg: //all in one file namespace toplevel { namespace stuff1 { classes and stuff } namespace stuff2 { classes and stuff } } but how do you spr...more >>

Running Queries...
Posted by Darryn at 7/18/2005 12:00:00 AM
Hi I am running a access query through my code that has some Nz functions in it. But when i execute the query i get the following error undefined function "Nz" in expression. Yet the query runs fine when i run it in access? how do i avoid this? Thanks Darryn ...more >>

When will get .NET 2005 original version
Posted by karunakar at 7/18/2005 12:00:00 AM
Hi All When will get .NET 2005 original version Regards, Karun ...more >>

Programatically disconnect users from SQL
Posted by Marc Jennings at 7/18/2005 12:00:00 AM
Hi, I need to rebuild a database each time I redeploy a test applicatio, and I was wondering if anyone could give me some clues as to how to go about disconnecting any users that may be logged into that database in SQL. I know I can do this quite easily using MSBuild, but the reason I need ...more >>

Math.Sqrt() and Decimal
Posted by David Dvali at 7/18/2005 12:00:00 AM
How can I use Math.Sqrt() with Decimal data? ...more >>

Reading Video Card String Description
Posted by Dean Landry at 7/18/2005 12:00:00 AM
I'd like to read the string description of my video card from CSharp. I'm thinking there might be a call to DirectX or a place in the registry to look. Any ideas? I will be using the string to determine what class of computer the program is running on within our organization. Thanks, D...more >>

Simulate Keypresses
Posted by dthom at 7/18/2005 12:00:00 AM
Hi, I have a Win CE 4.2.NET device, where i need to send F11 - but there is only 4 functionkeys on this device, therefore i want to promote F4 to become F11. In a normal Windows application i would just make a hook, rearrange the scancodes for F4 to F11 instead - but im not sure if this ca...more >>


DevelopmentNow Blog