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# > june 2006 > threads for wednesday june 21

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

Calling COM....
Posted by Wallace at 6/21/2006 11:56:25 PM
Hai All, Is it possible to call a COM from c# windows application by linking such that without running the COM in component services. Any suggestions? If yes, how can we do that? Thanx in advance... Looking forward for the response.... ...more >>


WinProc and Messages
Posted by Lav at 6/21/2006 11:42:13 PM
Hi, I want my Win form to listen to keystroke even when it is minimized. I think it can be done overriding the WinProc method. But I didn't get any useful articles on how to go about it. Can someone tell what would be the best way to do it ? Thanks Lav ...more >>

Embed Open File Dialog
Posted by Andrew at 6/21/2006 10:29:18 PM
I would like to embed an OpenFileDialog right into my Windows Form. Is this possible? Regards, Andrew ...more >>

Is there a C# code repository?
Posted by planetthoughtful at 6/21/2006 9:46:39 PM
Hi All, Just curious to know if there's a c# code repository similar to Perl's CPAN or PHP's PEAR etc? In particular, I'm looking for community developed solutions to common web development steps. Much warmth, planetthoughtful --- "lost in thought" http://www.planetthoughtful.org1 ...more >>

Listing of classes (similar to Java API)
Posted by TomC at 6/21/2006 8:25:31 PM
Coming from Java, I am looking for something similar to the online Java API pages. I did a search and found a thread from 2003 that listed the following link to an MSDN page. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/cpref_start.asp Not only does this seem to...more >>

Splitting long XML file into smaller pieces
Posted by Jenny at 6/21/2006 8:25:08 PM
Hello All! I have a long XML file that I should transmit to other computer using http. Problem is that the whole XML Document is too large for one transmitting. What is the nicest way to split XML document into smaller pieces e.g. to 10 pieces? XML document is same kind what comes to it...more >>

Looking for a C# VS 2005 Documentation/Help tool
Posted by antoan at 6/21/2006 8:22:30 PM
I have tried NDoc 1.3.1 - dues not support .net 2.0 assemblies (have also tried the hack involving a config file using the <supportedruntime version="v2.0.50727"> to no avail - crashes) as well as a beta NDoc 2005 (can initiate conversion from 2005 solution but also crashes - possibly bugg...more >>

How do I wait until all threads have completed
Posted by Thirsty Traveler at 6/21/2006 8:22:13 PM
I would like to create a test harness that simulates multiple concurrent users executing an individual thread. I would like this to be determined at runtime when the user specifies the number of desired threads. When this is kicked off, I would like to wait in the primary thread until all work...more >>



Platform For The.Net
Posted by SemSem at 6/21/2006 8:07:02 PM
The .NET framework or platform or visual studio.net must be run on an operating system and alot tell me its must be run on microsoft win OS is that right? and if one who is can program with c# can't use them if he using a a diffrent operating system. java as example can work in many pla...more >>

Thread Collections
Posted by Steve Foster at 6/21/2006 7:36:40 PM
I may be missing something simple, but I cannot find any way to get a collection of managed threads in a process. What am I missing? Steve (P.S. When I say managed, I mean System.Threading.Thread, not System.Diagnostics.ProcessThread). ...more >>

[newbie] Incapsulating a function
Posted by Giulio Petrucci at 6/21/2006 6:26:28 PM
Hi everybody, I have some different functions taking a double[] as their input data and returning a double value as their output data. Which implementation do you think is better? --first: class Op1 { private double[]d; public Op1(double[] data) { d=data; } public double[] GetR...more >>

beginner's question: usage of "using (...)"
Posted by R.A.M. at 6/21/2006 5:50:44 PM
Hello, I have started larning C# and I have a question concerning "using (...)" keyword. For example: using (SqlConnection connection = new SqlConnection(ConnectionString)) { connection.Open(); .... connection.Close(); } I can write it also this way: SqlConnection connection; try ...more >>

initialize an ADO object from an array of string
Posted by lluum NO[at]SPAM yahoo.com at 6/21/2006 5:48:37 PM
Hello All, I have a newbie question on ADO. I understand that I can initialize ADO objects from the results of a query to a database, or from a csv file. I have an array of strings. How can I pump the array of string into an ADO object with one or two lines of code (like initalize ADO from...more >>

Beginner's question
Posted by R.A.M. at 6/21/2006 4:44:48 PM
When to use "readonly" and when to use "const"? Could you explain me please? Thank you very much! /RAM/...more >>

Data from one stream to another
Posted by 7elephants at 6/21/2006 4:06:48 PM
I have the following piece of code to take data from one stream and put it into another... Int32 bufferSize = 100; Int32.TryParse(ConfigurationManager.AppSettings["bufferLimit"].ToString(), out bufferSize); byte[] buffer = new byte[bufferSize]; //make sure stream is at the beginning i...more >>

How to get custom controls to show in the toolbox
Posted by Torben Laursen at 6/21/2006 3:26:33 PM
Hi My project has a number of custom controls and I would like for them to be in the toolbox, but they dont. But searching google I found that they should show automatic but this does not seems to work for me. I can get them in by adding the dll to the toolbar "Choose items", but is the...more >>

Webbrowser control (AxWebBrowser) keeps disappearing....
Posted by UJ at 6/21/2006 3:12:25 PM
I have a C# win program with a couple of browser objects on the page. Every once in a while when I go in to edit it, the browser objects disappear from the page and I have to put them back. This last time, the objects where there but the dll reference was invalid. Has anybody else had this ...more >>

DataView IndexOf
Posted by randy1200 at 6/21/2006 3:09:02 PM
I have a CustomerTable which is a DataTable. I have a PersonalDataView which is a DataView. The code below returns the row index of the table beautifully. Any pointers on how to get the row index of the DataView? Thanks, Randy DataRow dr = CustomerTable.Rows.Find(CustomerId...more >>

Strange problem when deserializing
Posted by Chukkalove at 6/21/2006 3:03:29 PM
I'm sorry this message is so long. I have had to make some changes to an application written by a previous developer who used unmanaged serialization to store complex objects to file. The application is a RAD form designer to design screens for an embedded system and he only allowed for a sing...more >>

Weird Form Event Occurances
Posted by ChrisM at 6/21/2006 2:41:35 PM
Hi, Don't know if anyone can cast any light on this... I have a fairly complex C# WinForm with (amongst other) a text box and a button. The TextBox has events declared for KeyUp and KeyDown, the button has a simple Click event. Under certain circumstances (haven't worked out exactly what...more >>

Aero graphics card?
Posted by David Veeneman at 6/21/2006 1:38:36 PM
Not exactly a C# question, but one that C# experts can answer-- sorry if I'm off topic. We're going to upgrade a development machine to Vista when it comes out, and I'm getting ready to install Beta 2 on an idle machine with an AGP slot. The machine qualifies for everything except Aero glas...more >>

Vb.Net and My -> C Sharp
Posted by Maury at 6/21/2006 1:04:45 PM
Do you know if somewhere exists the conversione of Vb.Net 'My' class (or better My.Computer.Network.Ping) in C Sharp? Thanks M.A....more >>

using Type
Posted by Jinsong Liu at 6/21/2006 12:55:57 PM
I have a function, which accept two parameters, one is a object, another is a Type. I need to cast the object to the type define by Type. is it possible? void MyFunction(Object O, Type T) { // this is what I want to do T MyObject=(T)O; }...more >>

Why is DataTable.Clear() so slow?
Posted by Brett Romero at 6/21/2006 12:36:48 PM
I fill a DataTable with search results, which take a very long time if I first clear it. The values come from an object and I map them into the corresponding table columns. I may have 65000 results. I iterate through them, create a new row, fill it, and add it to the DataTable for each intera...more >>

Problem with EventHandlers
Posted by matt.grande NO[at]SPAM gmail.com at 6/21/2006 12:24:20 PM
Please, I REALLY need help with this one. I've been banging my head about it for three days now. Here's the situation. I have a form that runs some queries and functions and such. When all is said and done, there are several new controls (LinkButtons) on the page. Dynamicly created contr...more >>

Serialization Stuff...
Posted by Obinna at 6/21/2006 12:07:08 PM
Well I wrote this code that saved a Serialized ArrayList to disk in VB.NET and tried to read it in with another one in C#. Got some funny exception about my Assembly (can't rember exactly), what's with the assembly stuff. ...more >>

nullable types got me down
Posted by Steve at 6/21/2006 11:28:28 AM
I'm in the very early stages of evaluating an OR Mapper library called EntitySpaces (www.entityspaces.com) and it's really cool, but they use nullable types which are new to me and it's making my life very hard. I'm generating business entities from different MySql Dbs and some of the table...more >>

OT (slightly): Coordinating Multiple Developers
Posted by Smithers at 6/21/2006 11:01:39 AM
Until now I have worked on small teams (1-3 developers) and we've been able to stay out of each others way. Now I'm about to start work on a project that will have 5 developers. I would appreciate some guidance on how we can proceed to develop without having to worry about "who is working on w...more >>

Using VS 2005
Posted by tshad at 6/21/2006 10:08:54 AM
I have someone at work starting to look at converting our 2002 projects to 2005 and had quite a few problems with the project. I thought you could use either 1 or 2 file (codebehind) method. But when I create a project, I can't seem to find a place to make that choice. Is there a place to m...more >>

How Should I Do Bitwise Complement with Byte?
Posted by Marc at 6/21/2006 9:49:05 AM
I'm trying to set the first three bits to zero on a byte. For some reason, the compiler is casting the number peculiarly when I use the bitwise complement operator. Here's what I think should work but doesn't: byteArray[6] &= ~0xe0; // set the first three bits to 0 (11100000 == 0xe0) T...more >>

TextBox and New Line
Posted by poojo hackma at 6/21/2006 9:36:21 AM
How is the New Line character written to the TextBox field (TextBox.Multiline=True)? For example: TextBox1.Text = "Line 1\nLine 2"; Above does not produce 2 lines in the TextBox1. Simple question, but I am stuck on this. Thanks for your help. ...more >>

chdir equivalent
Posted by michael.tissington NO[at]SPAM gmail.com at 6/21/2006 9:30:22 AM
How do I do a chdir in C# ? ...more >>

Dual Monitors
Posted by Code Monkey at 6/21/2006 8:50:05 AM
Assuming a user has a dual (or more) monitor setup, how do I force a windows form application to open up and display in the default monitor of the system? Thanks in advance Dave. ...more >>

Datagrid right to left behaviour of cells only works when a cell has the focus
Posted by Greg at 6/21/2006 8:06:39 AM
When a datagrids RightToLeft property is set to true, as expected, it right aligns the caption text, and reverses the order of the columns. When typing text into a cell, the text is right aligned. However, when a cell loses focus, the cell's alignment returns to left aligned. Is this normal, o...more >>

Help with LINQ-where?
Posted by Bobstar at 6/21/2006 7:41:01 AM
Hello Just trying to do a simple select on my custom object. GridView2.DataSource = from jobs in new ifc.JobManagerFactory().GetByBPT(2355) //where jobs.JobID = "12" orderby jobs.J...more >>

WebMethod returning an XmlDocument generating a compile error in the client.
Posted by Thirsty Traveler at 6/21/2006 7:38:59 AM
I have a WebMethod as follows: [WebMethod] public XmlDocument OrderContract(XmlDocument doc) { return OrderBLL.OrderContract(doc); } However, the client is generating a compile error when the following lines are used: OrderWS.ContractServices txn = new OrderWS.ContractServices ();...more >>

EXCLUDE nunit from production release
Posted by Q. John Chen at 6/21/2006 7:38:52 AM
It is great to have an automated testing during development. BUT, How can I build the production release without nunit being included? THX. John p.s. I posted this in nunit group but seems there are not much activity there. ...more >>

IntelliSense doesn't work in single .cs with refrences.
Posted by Afshar at 6/21/2006 6:16:54 AM
Hi, I am writing a single .cs in IDE that uses some refrences that I have created previously as dll. I compile this refrences with /r switch in csc.exe with no problem. IntelliSense works with cs commands and syntaxes. But the problem is It doesn't know my own refrences and so doesn't show my...more >>

compile and debug a single .cs in IDE?
Posted by Afshar at 6/21/2006 6:08:00 AM
Hi Group, Can I compile and debug a single .cs in IDE? I want to set a breakpoint on my single .cs (in IDE) and call its method from other projects. This .cs is compiled to a dll every time and added to other projects. And compile it directy, NOT by csc.exe. Regards, Afshar ...more >>

Listview flickering and performance problem
Posted by James at 6/21/2006 5:50:41 AM
Hi all, I have made a derived Listview which can accept the controls as items in it. Controls that we are using are Buttons in each row and implemented Grouping with the help of controls(label on panel) . Coz Inbuilt listview Grouping not supported in OS like window 98. Although I had u...more >>

Event Properties using C#
Posted by sk.rasheedfarhan NO[at]SPAM gmail.com at 6/21/2006 5:26:25 AM
Hi All, before you understand my problem see the http://www.eventid.net the above URL is similar to my problem. According to my project requirement I will give the EventID as input of any Event. [Ex : MSSQLSERVER EventID is 17055]. So I have to retrieve all the standard properties of Ev...more >>

Assemply and using Activator.CreateInstance
Posted by Hulk at 6/21/2006 4:51:58 AM
Hello All, If I load an Assembly (.DLL file) from Process (.Exe file) using Activator.CreateInstance() method are there or should I remove Assemply (.DLL) from memory after using it with Activator's method other method? I would like to know that are there any possibilities that Assembly wi...more >>

Web Service calls failing after 5 minutes
Posted by TonyB at 6/21/2006 4:23:04 AM
We are calling a webservice running under SSL with a request that takes quite a while (8-12 mins) to return. This has been running fine on my desktop machine for some time now, but when the code is deployed to the live server, it fails after 300 seconds (5 minutes), with an error message: "S...more >>

XML Documentation
Posted by S Chapman at 6/21/2006 4:05:57 AM
I have ticked the XML Documentation option in my project properties and when I compile my project I just get an XML file in the bin\debug directory. How can I convert this file into a help file? Thanks. ...more >>

Logging NT Events
Posted by ipramod NO[at]SPAM gmail.com at 6/21/2006 2:57:39 AM
Hi, Is it possbile to retrieve all the Event Id's of a registerd source (Ex. MSSQLSERVER)? If it possible then can we retrieve the description of those Event Id's and can we generate the NT Event with the above NT Event and the desc for that? Some how I retrieve all the Event Id's of SQL Se...more >>

About best coding Style of C#
Posted by kiplring at 6/21/2006 1:37:01 AM
1. int[] intArr = new int[255]; 2. int[] intArr = new int[255]; rgnNumberArr.Initialize(); 3. int[] intArr = new int[255]; for( int i=0; i<intArr .lenght; i++) { intArr [i] = 0; } intArr allways initilized with 0 value? or should I initialize it? choose best code 1,2,3? ...more >>

Initialize in and unit (cs file)
Posted by laurent.sass NO[at]SPAM gmail.com at 6/21/2006 12:49:46 AM
Hello, I want to know how could i have an initialize method in a namespace. I want to make an auto-registration component like that : in ParentCollectionUnit public class myParentCollection { public static GetInstance(); // it is a singloton parent with a addSonCollection publi...more >>

Application.EnableVisualStyles() breaks my program!
Posted by Michael A. Covington at 6/21/2006 12:46:39 AM
I added Application.EnableVisualStyles() as the first statement in Main() of my program, and didn't notice much change in visual appearance, but what I *did* notice is that some of my buttons stopped working! They were enabled but no longer called their OnClick methods. I tried adding Appl...more >>

Update a dataTable to DB
Posted by Niron kag at 6/21/2006 12:42:02 AM
Hi, I try to get a dataTable from the DB , add it a row and update it back to the DB. The program does not throw exception but the DB is not updated. Can you please help me and tell me what I do wrong? Thanks in advance! public static void setOprjTableRow(string DBname , DataRow OPR...more >>

datagrid cell width problem
Posted by Jason Huang at 6/21/2006 12:00:00 AM
Hi, In my C# Windows form project. I am wondering can we manually define the width of a cell in a DataGrid? Thanks for help. Jason ...more >>

Connection string from Dataset VS2005
Posted by paolol at 6/21/2006 12:00:00 AM
Hi, I will like to read and set the Connection string in a dataset created by the Vs2005 wizard, but I'm not able to find any way to interact with is connection string ( unless I change the Xml and reload the app ). Thanks, Paolol...more >>

XmlReader, no ReadToEnd
Posted by Mr Flibble at 6/21/2006 12:00:00 AM
Is there a way to avoid With an object of type XmlReader is it possible to avoid while (reader.Read()) { // } i.e. read the Xml Document all in one go?...more >>

file upload at diff locations
Posted by puja at 6/21/2006 12:00:00 AM
hi all, I have website build using c# where I have 3 images in my homepage. I have a table called images where I store the physical path of all 3 images. eg: Image1 --> C:\StoreImages\User1\Image1.jpj Image2 --> C:\StoreImages\User1\Image2.jpj Image3 --> C:\StoreImages\User1\Im...more >>

gacutil
Posted by Geoffrey at 6/21/2006 12:00:00 AM
Hello, I have to install a COM library on some pc. For this, I must do a regasm "..." and a gacutil -i "..." but gacutil is not installed with .net2, on ly with VS and SDK. What is the best solution to install on client pc ? copy the gacutil ? ...more >>


DevelopmentNow Blog