Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!


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 2006

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

I Want to Extract all URL's from HTML
Posted by CrimeMaster at 7/31/2006 11:12:40 PM
Hi i have stored the html of a web page into a string.And i want to extract all the URL's and want to store them into an array of string. plz help me if some body had write this Function pls send me the code i will be thank full to u. CreimeMaster. ...more >>

throwing exception from constructor
Posted by Sek at 7/31/2006 11:09:01 PM
Is it appropriate to throw exception from a constructor? Thats the only way i could think of to denote the failure of constructor, wherein i am invoking couple of other classes to initialise the object. TIA Sek ...more >>

DataGridView SortMode Automatic Doesn't Work
Posted by mac at 7/31/2006 10:01:39 PM
I have a datagridview that I populate with the result of a web service. The webservice sends multiple rows back with each row as one element of an array. I use a for loop and the bindingsource.Add method to get the rows into the grid. That all works fine, but at runtime, the grid wont' al...more >>

New tool complete (pic enclosed) thx to all who helped me learn C#
Posted by Stick at 7/31/2006 9:43:02 PM
Hey, Thanks to all the guys that respond to those of us learning. I just finished this little tool in C#: http://home.comcast.net/~pwaugh/pics/PanelColors.jpg and so I wanted to say thanks for the help. ...more >>

struct on the stack... sometimes on the heap?
Posted by Johndoe at 7/31/2006 8:31:39 PM
Hi, A struct lives on the stack, right? What happens if I create a struct that contains a reference type? I'm guessing that there will be a pointer on the stack refering to my reference type. I'm not 100% sure. Can someone please confirm? Thanks. ...more >>

using operators and large value types
Posted by John at 7/31/2006 8:29:39 PM
I'm sorry if this is sounding like somewhat of a noob question. I'm loading in a large binary array of 8x8 double precision floating point matrices, right now this is defined something like struct Mat8x8 { double M11; double M12; . . . double M86; double M87; double M88; ...more >>

correct usage of static and const
Posted by Sek at 7/31/2006 7:29:13 PM
hi folks, i have a bunch of strings used in my code in many places. these strings reside inside a instantiable class. so, i want to replace these with constant/static variable to control the occurences. i have been looking at both static and const variables as the options, but couldn't d...more >>

Writing Control Characters to Standard Input of a Command-Shell Pr
Posted by Mark M at 7/31/2006 6:29:01 PM
I am attempting to use a third party command-line utility (WinDump.exe) to capture network traffic for perfromance analysis. This utility when launched captures network traffic until Ctrl-C is entered from the keyboard. I launch this utility (through a batch file) programmatically in a command...more >>



with service.exe.config file, I cannot start service
Posted by scott at 7/31/2006 6:06:43 PM
I create a service project and build into service.exe , intall it as system service. With a service.exe.config file in the directory as service.exe. so that I can not start service. I use vs2005 and windows xp thx! ...more >>

warn me on unused methods
Posted by Martijn Mulder at 7/31/2006 5:41:16 PM
A nice feature of the csc.exe compiler is that it warns you if a variable is declared but never used. But unused methods are not flagged, even when the warning level is set to 4. ...more >>

Automating Login for WebBrowser
Posted by Christof Nordiek at 7/31/2006 4:50:37 PM
I'm using the Webbroser-Control (.NET 2.0) to show a Page from a Webserver. User credentials may be required to access the Page. This credentials should not be entered be the user but be given by my program. Has anyone an idea, how to do this? thx Christof ...more >>

Changing the Font to Bold
Posted by Henry Jones at 7/31/2006 4:21:38 PM
I found some code to change the font on a button to bold: private void btnBold_Click(object sender, System.EventArgs e) { btnCalculate.Font = new Font(btnCalculate.Font, btnCalculate.Font.Style | FontStyle.Bold); } everything is cool. It works. I then wanted to change the fon...more >>

ordering const declarations
Posted by spam NO[at]SPAM darrenw.net at 7/31/2006 4:20:46 PM
I found a bug??? with constants in csharp. Consider the following: internal static readonly int MAX_BUFFER_SIZE=8192; internal static readonly int MAX_MESSAGE_LENGTH=MAX_BUFFER_SIZE-USER_DATA_OFFSET; internal static readonly int USER_DATA_OFFSET=29; When the constant MAX_MESSAGE_LENGTH ...more >>

Inherited ListView
Posted by David Gouge at 7/31/2006 3:46:02 PM
Hi all, Hope this is a simple one for you but i seem to be having a bit of a mental block. I have an inherited ListView (NewListView) class and an inherited ListViewItem (NewListViewItem) class. How do i get my NewListView class to accept NewListViewItems into and return NewListViewItem...more >>

Alternatives to Application.LocalUserAppDataPath
Posted by illegal.prime NO[at]SPAM gmail.com at 7/31/2006 3:14:27 PM
Hi all, I would like to find a standard place to put application data, but I don't want the pathname to include the application's version. Any suggestions? Thanks, Novice ...more >>

User Control Trouble with Runtime Property
Posted by dave at 7/31/2006 3:11:06 PM
I am having trouble accessing a property set during run-time in a user control that I have built. The control is supposed to connect to a database using the path supplied by the developer at runtime. Any assistance would be greatly appreciated. The code is as follows: In the class I declared t...more >>

Maximize child form
Posted by John at 7/31/2006 3:09:02 PM
I use C# in VS 2005. In my MDI app, if I click on the title bar of a child form, the form will maximize and the title bar will disappear. I want the app to do it automatically, when launching a child form, maximize it. The question is how to do it. Please help and thank you very much....more >>

combining datatables, anyone??
Posted by SMai24 NO[at]SPAM gmail.com at 7/31/2006 3:08:48 PM
I have two datatables in a dataset, i need to combine both of them into one table. Given that both tables have the same columns. Other than looping, anyone suggestions? Thanx in adavnce!! ...more >>

Singleton problem
Posted by ThunderMusic at 7/31/2006 2:25:32 PM
Hi, I have a problem regarding singletons in C#. What I would like to do is the following ClassA is a singleton ClassB inherits from ClassA and is also a Singleton there cannot and instance of ClassA and an instance of ClassB, there must be only one of one or the other... Is there a way...more >>

UserControl.Size=Parent.ClientSize;
Posted by Martijn Mulder at 7/31/2006 2:11:22 PM
I want my custom UserControl to size and resize with its parent, a Form. But when I use the code Size=Parent.ClientSize; in the constructor of myUserControl, Parent is null and the operation fails. What is the proper place to put this code? ...more >>

String and StringBuilder
Posted by Hardy Wang at 7/31/2006 2:08:28 PM
Hi all, I know it is better to handle large string with a StringBuilder, but how does StringBuilder class improve the performance in the background? Thanks! -- WWW: http://hardywang.1accesshost.com ICQ: 3359839 yours Hardy ...more >>

Cast from Object to DataSEt
Posted by Robert at 7/31/2006 1:53:01 PM
I need to put the Data Source of a DataGrid into a DataSet variable. I have tried the follwoing code but I get and error: DataSet ds = (DataSet)Convert.ChangeType(this.dgChgMgmt.DataSource, typeof(DataSet)); The error is: A first chance exception of type 'System.InvalidCastException' occ...more >>

How to get sorted rows from datagrid?
Posted by Brett Romero at 7/31/2006 1:43:07 PM
I'm binding a DataTable to a datagrid. I'd like the DataTable to use any kind of sort the datagrid is using so the two stay in synch. When some one clicks a data column header and sorts the grid, I want the underlying DataTable to be sorted. I've tried referencing DefaultView on the DataTable...more >>

VS2005 Debugging Problem, Breakpoints AutoDisabling Themselves
Posted by jonfroehlich at 7/31/2006 12:58:01 PM
My colleague is having problems debugging in VS2005. When he sets breakpoints in his code and launches his application via Debug->Start New Instance, the breakpoints autodisable themselves and the "breakpoint icon" switches from being filled in to outlined with a warning glyph on the bottom righ...more >>

Field Name
Posted by Jim Heavey at 7/31/2006 12:26:01 PM
I want to retrieve a property value. I have a method which is being passed (among other things) the "property name" in text format of the property that I want to retrieve the value from. Is there some way to retrieve the property value using the field which has the text name of the property ...more >>

Looping Through SubTables in a DataSet
Posted by randy1200 at 7/31/2006 12:24:02 PM
My hope is that somebody has a thought on this, or can point to toward an article that's useful. I have the following: DataSet ds = new DataSet(); ds.ReadXml("MyData.xml"); Each MainTable entry has subtable relations. Here's my current approach: foreach(DataRow row in ds.Tables["MainTabl...more >>

Creating an Access database from a SQL Database
Posted by RSH at 7/31/2006 12:06:26 PM
Hi, I have a situation where I have created a little application that makes an Access database from a SQL Database for reporting purposes. it does the job well, but it seems a bit slow. Is there anything that i can do to speed the app up a bit? namespace SQLToAccessBackup { c...more >>

TreeView Component in visual Studio 2005
Posted by kvicky at 7/31/2006 12:04:02 PM
How to have a TreeView Component in a Web Page in Visual Studio 2005. Thanks ...more >>

Making A Constructor Only Available To Another Class that Doesn't Inherit From It
Posted by ffrugone NO[at]SPAM gmail.com at 7/31/2006 11:50:19 AM
My scenario involves two classes and a database. I have the classes "Broom" and "Closet". I want to use a static method from the "Closet" class to search the database for a matching "Broom". If it finds a matching "Broom", i want it to return a "Broom" object to the calling program. I want t...more >>

Accessing base-form functions from other forms
Posted by Xarious NO[at]SPAM gmail.com at 7/31/2006 11:43:34 AM
Hi all, I need to bring up a form off of my base win form and then, depending on which button the user clicks, perform a function that is in my base form. I can create an instance and show the new form fine, but I am unsure as how to perform function calls from the new form once it has bee...more >>

C# Events and Delegates - When do they fire?
Posted by Ty Salistean at 7/31/2006 11:39:03 AM
So, here is a wierd question that we have been discussing for a bit now. Does an event fire even though nothing is subscribed to listen to the event? For instance, does the Click event of a button fire even though nothing is subscribed to listen to the event. The answer is NO in a tradi...more >>

How to uses C# monitor print
Posted by oldgun at 7/31/2006 9:05:54 AM
How to uses C# monitor print ...more >>

Enhancement idea: Private interfaces?
Posted by WXS at 7/31/2006 8:44:02 AM
I know this sounds contrary to the idea of an interface, but read this and see what you think ----------------------------------------------------------------------------------------- It would be nice if there was a way for a class to create a special type of interface, a private one. Private ...more >>

Windows key - LWin
Posted by AntoineKrige NO[at]SPAM hotmail.com at 7/31/2006 8:28:09 AM
Hi, I have the following windows form code to trap the 'key press' of the windows key (LWin). How do I stop the key event from being processed? I'm trying to block the use of the LWin key... using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; ...more >>

strong key problems
Posted by per9000 NO[at]SPAM gmail.com at 7/31/2006 7:41:07 AM
Dear readers, I have some problems with strong keys. What I want to do is basically this. A - create an application (f.x. strongHello.dll) with a strong key. B - import the functions of this dll into a console application (f.x StrongConsoleApp.exe) and run it if I have somehow specified the...more >>

Icon context menu
Posted by auad at 7/31/2006 7:13:16 AM
hi, I would like to know how to implement the following situation in c# or VB.net: I want to know how to display the application icon in the windows context menu (just like winrar does) Thanks in advance Bruno ...more >>

Add "spaces" to string
Posted by gdjoshua at 7/31/2006 6:59:02 AM
New to C##.. All I want to do is add spaces to a string I'm displaying in label? Anybody know the easiest way to do this. char(32) doesn't seem to be working......more >>

toolboxbitmapattribute
Posted by plmanikandan NO[at]SPAM gmail.com at 7/31/2006 6:40:35 AM
Hi, I need to provide bitmap to my user control.If the bitmap is available,then use that bitmap ,else use the standard image of control For example i'm creating a customized button(mybutton) [ToolboxBitmap(typeof(Button),"test.ico")] public class MyButton : System.Windows.Forms.Button I ma...more >>

XmlTextReader object copying
Posted by lucoto NO[at]SPAM gmail.com at 7/31/2006 6:26:51 AM
Hi, Can anyone explain me how to copy a XmlTextReader object instead of copying a reference to it? I tried to use MemberwiseClone() method but it doesn't make a deep-copy as well.. and ICloneable interface is not inherited by XmlTextReader class. Hopefully there are some other ways to do it but...more >>

.NET based backup app
Posted by adnan938 NO[at]SPAM yahoo.com at 7/31/2006 5:23:32 AM
Hi all, I'm trying to write my own NTBackup clone in C#, but entirely command line driven and supporting stdout redirection of backup stream. I don't want to start from scratch, so anyone know of any existing projects with similar aims, or code fragments. Thanks in advance, Adnan ...more >>

Help regarding DirectX
Posted by Abdul Azeez(BLR) at 7/31/2006 3:40:10 AM
Hi, I need to use DirectX in my application for drawing the network diagram. May I know the procedure to draw a Graph( Rectangular boxes connected with straight lines) using DirectX. Could you please throw some light on DirectX as I have very little knowledge about it. My main intension i...more >>

Problem with reading process's output using BeginOutputReadLine
Posted by Mikko_Nylén at 7/31/2006 3:29:54 AM
Hi!, I'm trying to read the output of an process as it gets executed and append the output to a RichTextBox. However, I have a little problem: the process I'm trying to execute is a Python script, which uses the time.sleep() to sleep for a specified amount of time. This (the use of time....more >>

SaveFileDialog translation issue
Posted by berylwilson NO[at]SPAM gmail.com at 7/31/2006 2:28:18 AM
Hi all. In my application I use SaveFileDialog as follows. SaveFileDialog exportFileDialog = new SaveFileDialog(); exportFileDialog.Filter = "csv files (*.csv)|*.csv"; exportFileDialog.RestoreDirectory = true ; exportFileDialog.CreatePrompt = true; Since I have enabled CreatePrompt to ...more >>

Launching and Monitoring Executables
Posted by Water Cooler v2 at 7/31/2006 1:54:19 AM
I have a Windows Service I am writing in C# and a set of, let us say three, other executables written in C# (mostly console applications). I want that the Windows Service must do so every few seconds: Check to see if each of the other executables are running or not. If they are not running, ...more >>

Free .Net data provider.
Posted by Joel Silva at 7/31/2006 12:00:00 AM
Hi, here is information about a free, simple and effective data provider for Web and windows Forms. ..Net DatabaseHandler 1.1 was developed in C# and it may be used both with .Net 1.1 and 2.0 applications. It allows a developer to use the same API for accessing Sql Server 2000, SQL Se...more >>

Deploying Crystal Reports
Posted by Mantorok at 7/31/2006 12:00:00 AM
VS.Net 2005 Hi all I have a page that uses the Crystal Reports Viewer control, the reports themselves are held in another (referenced) project. How exactly do I deploy these reports with my web-site? Thanks Kev ...more >>

css file works in IE but not in firefox
Posted by puja at 7/31/2006 12:00:00 AM
hi all, I have an asp.net website where am including .css file dynamically on page load event. For diff users, there is diff CSS file. So after user logs in, I am setting CSS href on page load. My CSS file works fine in IE 6.0 when i specify the absolute path. eg- href ="D:\Mywebsite\css\my...more >>

Crystal Reports - The report contains no tables
Posted by news.zen.co.uk at 7/31/2006 12:00:00 AM
I'm a bit new to Crystal Reports - I have a query that runs in my program and I am putting the query results into a datatable... I then use the following code to show the report: repDiary DiaryReport = new repDiary(); DiaryReport.SetDataSource(tblReport); frmCrystal ReportForm = new frmCrys...more >>

synchronization issue
Posted by cristalink at 7/31/2006 12:00:00 AM
The below is perfectly OK in C++, but I wonder how safe is it C#. There are cases when one thread is writing to, another one is reading from the same variable. I don't want/need to synchronize the access. My question is, can the .NET framework handle this scenario, or it may throw an except...more >>

can't view source code
Posted by Jeff User at 7/30/2006 11:32:26 PM
Hi all Anyone have any idea why, when I am running my .net1.1 C# web application in debug mode, right clicking and then choosing "View Source" does not work? The screen flickers a tad, but the window never opens with the source ? Jeff...more >>


DevelopmentNow Blog