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 2005 > threads for tuesday 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

Serializing a list of different object types.
Posted by chaitanyag NO[at]SPAM hotmail.com at 5/17/2005 11:45:54 PM
Hi, I have my data stored in a set of classes (or structs, doesn't matter), which I am trying to serialize. These classes are stored in an ArrayList, which serializes ok when all the objects in the list are of the same type. For example, if i have public class A { string A1; ...more >>

Callbacks and Threads
Posted by Adam Clauss at 5/17/2005 11:28:35 PM
Couple questions: 1) I have an application using TCP sockets. When I make a call to BeginReceive(), is the callback I specify called in the current thread or from a new thread? 2) Similar to the first, with regards to events. When I actually call an event (with some number of delegates a...more >>

BinaryReader munges data
Posted by Kevin Trojanowski at 5/17/2005 9:49:48 PM
I'm about to rip out what little hair I have left; I have a class that uses a BinaryReader, and the data is getting munged. A subset of the code follows; I've removed the parts that aren't relevant. What's really strange is that it reads the file just fine until the 272nd call to the Read ...more >>

question about comboBox
Posted by Claudia Fong at 5/17/2005 9:46:20 PM
Hi, I would like to know if is possible to "know" which is the comboBox.SelectedIndex without "clicking any button". I used this int selectedIndex = comboBox2.SelectedIndex; to get the index, but it only works if this code is inside a button1_Click. What I would like to do is when...more >>

C# implicitly convertion??
Posted by Eranga at 5/17/2005 9:40:23 PM
My Error is " Cannot implicitly convert type 'object' to'CIODMLib.CatAdmClass' " The code segment is as follows; public class Indexing { protected CIODMLib.AdminIndexServerClass admNew; protected CIODMLib.CatAdmClass catNew; public Indexing() { admNew = new CIODMLib.AdminI...more >>

how can I create shared variables in c#
Posted by News User at 5/17/2005 9:31:29 PM
This may sound stupid but I am having trouble figuring out this one. Any help would be appreciated. I have 3 classes ClassA & ClassB and ClassC From ClassC I would instantiate ClassA ClassA inturn uses/ instantiates ClassB I would like to create a variable in ClassA that can be accessed ...more >>

Pointers/References
Posted by Maksim at 5/17/2005 7:59:01 PM
I'm trying to imprort an AVL Tree written in C++ to C# and I have a problem translating this statement: root_parent = (Node *) &this->_Root I'm using classes for my Nodes and so I can't use '&' with classes. So how do I write this in C#?...more >>

retrieve data from a db
Posted by Claudia Fong at 5/17/2005 7:54:25 PM
Hi, I have a comboBox and a textbox in my form. I already can display in a comboBox the department names; what I would like to do is display in a textbox the department ID related to the department name I chose from comboBox. below is the extract of the code: OleDbCommand myCommand...more >>



C# and LDAP
Posted by Vish at 5/17/2005 7:03:26 PM
Hello all, I am trying to get all 'active' user details (username, firstname, lastname) from win 2003 AD server using System.DirectoryServices. It works fine. But it is too slow for getting all the 400 users. The following is the code i have written. I found that its doing s pretty quick ...more >>

How to specify default text for a custom button control.
Posted by Vern at 5/17/2005 6:33:01 PM
I'd like the default text to show up in designer, and allow it to be changed to something else. I was able to change some of the other properties, but for some reason I'm having trouble with the text. Here's the code from my latest attempt. I initially tried just setting this.Text = "E&xit" ...more >>

Icons not showing up on Treeview
Posted by Keith Elder at 5/17/2005 5:10:03 PM
I am using VS 2005 Beta and I have a Treeview UserControl that I built for a menu. I added an imageList to the control and added some icons that I want to associate with the control. When I build the solution and view the UserControl placed on a form in the designer, I can see the icons. ...more >>

Getting Negative Int
Posted by Smithers at 5/17/2005 4:17:20 PM
int k = 8; elsewhere in the code, I need to k to be -8. I could do this: int negativeVal = 0 - k; is there a better way? Thanks! ...more >>

Parse datetime
Posted by dwight at 5/17/2005 2:39:01 PM
Is there a way using DateTime.Parse to validate a date in the following format? mm/dd/yyyy Thanks...more >>

How to check if a string is an XML before calling LoadXML(str)?
Posted by cloudx at 5/17/2005 2:32:06 PM
hi there, in VB LoadXML(str) returns true or false so that you can do different coding when the str is XML or not, but in C# LoadXML doesn't have return but only throw exception if str is not XML document. How would I do if I want to do my own code if str is not an XML? thanks!...more >>

c# ssl tcp socket how?
Posted by Vo at 5/17/2005 1:53:18 PM
Is there a way, using stock .net framework functionality, to open a tcp connection over an SSL channel? I'd rather not get into buying libraries, etc. Java has the javax.net.ssl.* objects, and I'm not finding an equivalent in c#. Note this is a socket connection, not an HTTPS connection. ...more >>

How to wait for window to load (threading)?
Posted by Brett at 5/17/2005 1:46:53 PM
Say I open an IE window and call the Navigate() method. A web page opens. I use a delegate to capture the DocumentComplete and NavigateComplete2 events. However, they fire slightly before the page completely loads. This article addresses the above issues for OnBeforeNavigate2 event: http:...more >>

DataGrid styles
Posted by Christopher Weaver at 5/17/2005 1:24:03 PM
I've created a TableStyle in the collection of TableStyles. Now, how do I get it to apply to the DataGrid? ...more >>

Timer.Tick event not firing
Posted by Jason at 5/17/2005 12:22:28 PM
I have an application that uses a timer. I've created a function called TickEvent that I "assigned" to the timer1.Tick event: this.timer1.Interval = 1000; this.timer1.Tick += new System.EventHandler(this.TickEvent); .... private void TickEvent(object sender, System.EventArgs e) { liSecond...more >>

How to communicaton between two applications
Posted by George Chen at 5/17/2005 11:42:24 AM
Hi I have lots applications are already written by C++. It 's easy to use PostMessage in one application and catch this message in another application's WndProc Function. Since .net have some powerful library. I use C# to develop new application. But I do not know how to using simlar func...more >>

casting to a derived class
Posted by Steve Teeples at 5/17/2005 10:51:10 AM
Can someone tell me the correct method of casting and object at run time. Here is a sample of what I'm trying to do. classA acts as a base for classes that execute code in classes derived from ProBase. How do I property cast the derived classes from ProBase during runtime so that I can acce...more >>

RegEx HELP!!!
Posted by Vai2000 at 5/17/2005 10:15:08 AM
RegEx Help Need RegEx for extracting the XY*13*17*22*90 from the given document. ............ AB*1*1*12*9 XY*13*17*22*90 BS*1*1*4*9 ............ TIA ...more >>

Regular Expression for comma period dash etc
Posted by Sue at 5/17/2005 9:43:54 AM
Hello I'm new to this Regular Expression and need some help. I want to restrict what the user types in a text box. The User can type only A-Z, a-z, 0-9, spaces, comma, dash, period, single and double quotes. If it has anything other than that, I need to display message. How would I do th...more >>

Capturing key presses in a TextBox subclass
Posted by Andrew Ducker at 5/17/2005 9:21:59 AM
I have a subclass of TextBox, and I want to check that whenever the text is changed the information in there is still a valid number. I thought that overriding KeyPress with the following would work: string oldText = this.Text; base.OnKeyPress (e); try { decimal.Parse(this.Text); } ca...more >>

Big Memory Leak in XmlDocument.Load("filename");
Posted by bleedledeep at 5/17/2005 8:44:35 AM
I've been tracking down a memory leak using DevPartner 7.2 and what I am seeing is that calling XmlDocument.Load() leaks A LOT of memory. The following code is called when I click a button on my test form. (this is test code I wrote to confirm the bug, not my actual code) private void butt...more >>

Uninstall problems with Office PIA
Posted by Maik at 5/17/2005 7:38:13 AM
Hello, I've developed a solution with VS2003, which automates Excel XP. I created a setup project featuring install of the Primary Interop Assembly 'microsoft.office.interop.excel.dll' in the GAC. I added a condition: If the dll already exists (correct version) in the GAC then a new install...more >>

TCPClient Write or BeginWrite (Sync or Async)
Posted by Jeff Weber at 5/17/2005 7:32:03 AM
First, my question: Should I use Write or BeginWrite (sync or async) to stream data to my clients. Details: On the server I have a custom circular data buffer that receives byte array data representing data structures at a rate of 30ms. On a thread seperate from that which Enqueues data ...more >>

Using the vbCrLf constant
Posted by Michael.McD at 5/17/2005 7:31:04 AM
Would anyone know how I might access to the vbCrLf constant. I'd like to use teh following bit of VB code in C#: strFoo.Text.Replace(vbCrLf, chr(10) ) Thanks in advance, Michael McD Ps and what id the C# exuivilent of chr(10) is it (char) 10?...more >>

TCPClient Synchronous or Asynchronous Writes
Posted by Jeff Weber at 5/17/2005 7:28:03 AM
First, my question: Should I use Write or BeginWrite (sync or async) to stream data to my clients over a TCPClient connection. Details: On the server I have a custom circular data buffer that receives byte array data representing data structures at a rate of 30ms. On a thread seperate fr...more >>

Format16bppGrayScale not supported
Posted by Jos Lavrijsen at 5/17/2005 6:56:02 AM
After searching newsgroups and discussions, i came to the following conclusion. Even though PixelFormat.Format16bppGrayScale is defined, it's NOT and will NEVER be supported by the .NET framework. For our business (medical imaging), this is very disappointing. 16 bit gray is most common imagef...more >>

NDOC is skipping some of the XML comments
Posted by Sapthar at 5/17/2005 6:23:30 AM
Hi all, My problem is as follows: I have installed the latest NDOC (1.3). I see that some of the XML comments are not getting included in the CHM file. These comments are there in the XML files, but not in the final output. What could be going wrong? Thanks, Ssapthar ...more >>

Taking fields out of a string
Posted by Jac at 5/17/2005 5:42:02 AM
Hey, I have a string (an document.rtf loaded in a stream and then via streamreader.ReadToEnd i filled the string) Ex. of the string " My name is &replacename& My address is &replaceadress& ... " Now i want just to take out of the names between the & and i want to put then in an arra...more >>

Convert string to date format
Posted by megala at 5/17/2005 5:38:02 AM
Hi How to convert a string "11022005" to a specific date format-02/11/2005...more >>

connect to a database (question)
Posted by Claudia Fong at 5/17/2005 2:59:14 AM
HI, I'm trying to connect to a db using ADO.NET in C#, but it generate error.. I want to display in a combobox the values of one of the field. (department name) I'm new in C#, so I don't know what happen to the code below: OleDbConnection objConnection = new OleDbConnection("Pr...more >>

unload a form (close a form)
Posted by Claudia Fong at 5/17/2005 1:50:15 AM
Hi, I have more than one forms in my program, and I would like to for example, in form1, I will call form2 and in form2 it will call form3. But the problem is when I call form2.Show, it does show the form2, but how can I unload form1? If I put form1.close, it will close everything. :(...more >>

Reflection question
Posted by Rich Noons at 5/17/2005 12:00:00 AM
If I'm doing some reflection on System.Windows.Forms.dll in the System.Windows.Forms.ScrollableControl class one of the methods get_Controls has a return type of System.Windows.Forms.Control+ControlCollection Does anybody know what the "+" represents? get it also on get_Dockpadding get...more >>

How to implement run time form designer?
Posted by Julia at 5/17/2005 12:00:00 AM
Hi, I need to implement simple runtime form designer,and I would like to ask can and should I use the win form form designer? Thanks in advance. ...more >>

oppss...ICustomTypeDescriptor convert my control to NonVisual?!
Posted by Julia at 5/17/2005 12:00:00 AM
Hi, After implementing ICustomTypeDescriptor on my UserControl When ever I drop the control it moved to the none visual area Which properties or attributes should I add to my Descriptors collection in order to make my control Visual again? Thanks in advance ...more >>

Optimization: how to exclude unused code ?
Posted by Maxim at 5/17/2005 12:00:00 AM
Greetings, In my C# project, I'm using a third-party Opensource library... in source code form. I mean no assemblies, just pure source code. It allows me to add new application-specific functionality to that library, finetune it, and see how things work. Well, the problem is that the l...more >>

Best practice for waiting for worker thread to complete
Posted by MarkR at 5/17/2005 12:00:00 AM
Hello: I would like to know the best way to spend idle cycles while waiting for a thread to complete. I've seen numerous conversations on this group about how unnatural Application.DoEvents() is, but can't find a good recommendation on what I *should* do. <Background> I have inherited a...more >>

Navigate a DataSet/DataTable
Posted by Carl Lindmark at 5/17/2005 12:00:00 AM
Hello, I am having trouble understanding how to navigate a DataSet table... - maybe someone can steer me in the right direction? Say you've read an XML document into a DataSet ("myDataSet") and then filled a DataTable by doing: myDataSet.Tables["situation"]; and the XML looks this way: ......more >>

ASP.NET, Delphi 2005 and Hasp
Posted by Mateusz [PEYN] Adamus at 5/17/2005 12:00:00 AM
Hi I'm writing an asp.net application in delphi 2005. App is secured by the hasp hardware key. On my computer everything works fine but when I put the app on the test computer (without delphi) appliaction cannot connect to the hasp key. Further more I can't even call the Login method - ...more >>

newbie What is best approach to do this?
Posted by Jeff at 5/17/2005 12:00:00 AM
IDE: vs .NET 2003 OS: xp pro sp2 I need to create a class which can hold a x number of objects... Think of the class as ArrayList, it can hold x number of objects... But using the ArrayList doesn't suit entirely here, because I need to add some additional properties / methods to this class...more >>

Debugger.Break() and Abort/Retry/Ignore
Posted by rawCoder at 5/17/2005 12:00:00 AM
On running a console app from Windows Server 2003 with Debugger.Break() makes an Abort Retry Ignore popup appear stating that a user defined breakpoint is reached. Works the same in both Release and Debug Builds. How to avoid this ? Thank You rawCoder ...more >>

Excel automation license
Posted by Frank at 5/17/2005 12:00:00 AM
Hello, I have an Excel spreadsheet do calculate stuff. When I put that sheet on a target machine and access it with C#, do I need an Office/Excel license on that target machine? Thanks Frank ...more >>

Showing and Hiding Forms
Posted by Eric W at 5/17/2005 12:00:00 AM
CreateProductForm f = new CreateProductForm(); f.Parent = this; f.Show(); I'm trying to show a child form on the smartphone. It works fine when i just call f.Show() but as soon as I set f.Parrent, the form never displays. Can anyone help me. I need to be able to close the parent f...more >>

The problem of com event and its registe
Posted by Jet at 5/17/2005 12:00:00 AM
Hi all, As some special need , I have to make a com component in c#,but I don't know how to make a com object event, I had declared a event interface. Like this: delegate void EventHandler(object sender,EventArgs e); [Guid("xxxxx-xxxx"), public interface Imethod:Ievent { [DispId(1)] v...more >>

excel automation
Posted by Frank at 5/17/2005 12:00:00 AM
Hello, I have an Excel spreadsheet do calculate stuff. When I put that sheet on a target machine and access it with C#, do I need an Office/Excel license on that target machine? Thanks Frank ...more >>

Which is the default UITypeEditor for Point?
Posted by Julia at 5/17/2005 12:00:00 AM
Hi, Which is the default UITypeEditor for Point in PropertyGrid? Should i write my own UITypeEditor? Thanks in advance ...more >>

UserControl assembly reference
Posted by Meir at 5/17/2005 12:00:00 AM
Hello, I'm new in C# and .net, I'm doing the Walkthrough: Creating a Web User Control that comes with Visual Studio .Net 2003. In this Walkthrough you create a User Control and call it from a WebForm, when executing it I get: Compiler Error Message: CS0234: The type or namespace name 'Globa...more >>

(ASP.NET) User control browser unable to gain focus
Posted by ASP.Net programmer at 5/17/2005 12:00:00 AM
I already posted this in the ASP.NET framework group, but no one could help me there. Maybe someone in here has encountered this problem: I have a very weird problem with an ASP.NET page I developed in Visual Studio .Net 2003: The page has an asp panel which contains a user control (to kee...more >>

Custom Controls
Posted by Eric W at 5/17/2005 12:00:00 AM
I want to build a custom control that will display a signal indicator. Basically I have 4 images and depending on the current state, I will display one of these images on the screen. I want to build it as a custom control so i can add it to multiple pages of the form. The control should also ...more >>

Displaying help for user defined functions
Posted by Sinex at 5/17/2005 12:00:00 AM
Hi, I have a main application (WinForms). I developed a DLL with some utility classes. The App uses these Utility classes...creates objects of them and then calls their public functions. Now, while typing out the function call (say objUtility.Func1(args) ), there is a tooltip that appears ...more >>


DevelopmentNow Blog