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 7

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

Chkdsk display of 'in use by the system'
Posted by _DD at 6/7/2006 11:40:30 PM
File system question. Even expert config-techies don't seem to know this, but one of the local OS experts will: Chkdsk, on a newly formatted partition, often says "140000KB in use by the system.' I'd understand if the MFT was keeping previous directory info, but the number above (140MB) see...more >>

Application interface designing
Posted by jack at 6/7/2006 11:16:12 PM
Hi all, im in a middle of an project and it is going pretty well. But one this that is always in back of my mind is the interface design. every day i look at it i tend to change either the position of label or textbox i have seen many application which have cool user interface. i want to know i...more >>

what is the best way to make a DataTable thread safe? DataTable.AcceptChanges() will throw exception (not documented)
Posted by Ryan Liu at 6/7/2006 11:07:59 PM
Hi, In the .NET Framework SDK documentation, I can see DataRow.AcceptChanges method will throw RowNotInTableException exeception. And in DataTable.AcceptChanges(), the documentation does not mention it will throw any exception, but in my code (multi-thread), I see it throw exceptions at tw...more >>

How do I fix this error warning
Posted by Robert Bravery at 6/7/2006 10:23:45 PM
Hi, When compiling an app in C#2005 I receive this warning: Warning 1 Invalid search path 'C:\Program Files\Microsoft Visual Studio ..NET\FrameworkSDK\Lib\' specified in 'LIB environment variable' -- 'The system cannot find the path specified. ' Can any one offer some advice Thanks Robe...more >>

Capture subject line from the received mail
Posted by Kondapanaidu at 6/7/2006 10:03:39 PM
Hi, I am using C#.NET2.0, My system Configured with Outlook, If any mail comes to My Outlook, We need to capture the subject line from that mail using in C#.NET, how to capture the subject line from the received mail. Thank in advance for giving great inputs Thanks & regards Kond...more >>

Attributes with multiple objects as param for constructor
Posted by ThisBytes5 at 6/7/2006 8:12:54 PM
I am using an attribute on the properties of my object to help with parsing of data. The attribute will determine if the current property is to be populated based on the version of the data. As such I need to be able to create the attribute with the version and some other values for the version....more >>

Converting File Formats (Unix to Windows)
Posted by VC at 6/7/2006 5:35:42 PM
Hi, Greetings. Not sure if this is the right forum..... In case I should visit some other forum please let me know. Does Dot.NET provide a quick method/way to convert a UNIX text file to DOS format? Cheers!!! V ...more >>

Code Generation for property 'xxx' failed
Posted by slawrence at 6/7/2006 5:31:08 PM
Hi I am getting an error "Code generation for property 'SubCategoryId' failed. Error was 'Property accessor 'SubCategoryId' on object 'yyy.zzz' threw the following exception: 'Object reference not set to an instance of an object.'' after porting my code from V1.1 to V2.0. The class yyy is a...more >>



Casting arrays fails at runtime
Posted by eric.dennison NO[at]SPAM gmail.com at 6/7/2006 5:23:27 PM
In the sample below: testClass is derived from object. We can cast object to testClass, no problem We can cast testClass[] to object[] no problem Compiler is ok with cast object[] to testClass[] but fails at runtime. Why? I understand this can be worked around using Array.Copy, but I a...more >>

about the class string
Posted by Tony Johansson at 6/7/2006 4:57:08 PM
Hello!! I have a simple question and that is about the class Class1 below. As I have learned the datatype string a reference type. I set the number field to "1" in main and pass this number to method foo. In foo I changed number to "2" but when I come back in main it's still "1". If I use r...more >>

Design question
Posted by Steve Long at 6/7/2006 4:43:49 PM
Hello, I have a design question that I'm hoping someone can chime in on. (I still using VS 2003 .NET 1.1 as our company has not upgraded XP to sp2 yet. duh I know, I know) I have a class I wrote (CAppInit) that I use for application configuration. It behaves similarly to Configuration.AppSettin...more >>

Why Do Rererences Get Switched?
Posted by Robert W. at 6/7/2006 4:32:01 PM
I have a VS2003 WinForms app with a main project called "Desktop". It references a DLL I've also created called "DataTransfer". When setting up the references of Desktop I specifically chose the DataTransfer.dll file WITHIN DataTransfer\bin\Debug When I run the project, everything works f...more >>

Using an array as a Class member
Posted by Peter Hallett at 6/7/2006 3:51:03 PM
I would like to set up a string array as a class member, or field, and then populate this array by reading in from a text file, but I cannot find the appropriate syntax. The getter and setter are very unhappy with the idea and the compiler refuses to play ball with any of the attempts I have ...more >>

Questions about Dispose()
Posted by TheSteph at 6/7/2006 3:12:07 PM
Hi, In the example below, do I have to call Dispose for the 2 ImageList ? Do I have to do it in the Form.Disposed event ? public class FRM_NavBrowseConfig : Form { //... private ImageList FSmallImageList = new ImageList(); private ImageList FLargeImageList = new ImageList(); ...more >>

Not supported?..
Posted by TJ at 6/7/2006 3:06:03 PM
Hi, C# / .NET Framework 1.1 I would like to query extended stored procedure like stored procedure... However, I found that CommandType property does not have Extended Stored Procedure value..... I tried something like.. SqlConnection con = new SqlConnection(....); SqlCommand command ...more >>

Send Email from C# App
Posted by Rick at 6/7/2006 3:05:08 PM
Hi guys one question, i have this code, it works for a smtp that doesn't ask for autentification using System.Web.Mail; MailMessage mail = new MailMessage(); mail.To="email@hotmail.com"; mail.Subject="descr C#"; mail.From=emaill@domain.com; mail.Body = "some text"; SmtpMail.Sm...more >>

Framework 1.0 application port to 2.0
Posted by Hemang Shah at 6/7/2006 2:41:18 PM
Hello I have an application I developed on the 1.1 framework. Now I want to take advantage of the 2.0 framework in my application.. Can I just recompile my existing code on 2.0? How does this work and how do I do it? Just open the application source on VS 2005 and compile it ? Any doc...more >>

Sharing Code files
Posted by David at 6/7/2006 2:39:01 PM
How do I share code across files in C#, without including a reference to a class library. Here's what I want to do. I have a device I want to talk to. It's a machine in a factory. It can talk on a serial port, or over ethernet. Either way it's talking, it sends the same data. So, I enc...more >>

"Enumerated" strings
Posted by Curtis Justus at 6/7/2006 2:15:08 PM
Hi, We are porting an application that contains a list of strings. We would like to use these strings within code such as a switch statement. What would be the best way to create a list of items that could be used within a switch statement (or something like that)? Thanks in advance, ...more >>

Is it possible to Bind Two sockets to two endpoints with the same IP/PORT
Posted by DaTurk at 6/7/2006 1:54:57 PM
I have this MultiCast application I'm working on, and for some reason it won't let me bind more then one socket onto different emdpoints using the same ip/port. I'm new to network programming so I don't really understand why this would be a problem. ...more >>

Help!!!!!! - Find Function not working from C#
Posted by andyblum NO[at]SPAM gmail.com at 6/7/2006 1:53:28 PM
I have been enjoying Excel programming but am now hitting a wall. I simply want to transfer all data from the spreadsheet at runtime. The spreadsheet is read ever 1 secs on a timer as it has real-time streaming data inside of it. I figured the first step was to dynamically figure out a ra...more >>

help with this code
Posted by Avi G at 6/7/2006 1:49:02 PM
Hi, i have this code private void ShutDown_Click(object sender, EventArgs e) { if (checkBox1.Checked) { Process ShutDown = new Process(); ShutDown.StartInfo.FileName = "ShutDown.exe"; ShutDown.StartInfo.Arguments =...more >>

Close Form
Posted by Claudia Fong at 6/7/2006 1:15:28 PM
Hello everybody, I have a Menu form where I have a button. The user should click the button and the program should open another form call register form. I want that when the program show the register form, the menu form will close or hiden. I use the close () method, but it close everythi...more >>

ConfigurationSettings.AppSettings
Posted by Simon Hart at 6/7/2006 11:57:44 AM
Hi, I want to use the ConfigurationSettings.AppSettings from within a .NET class library that gets called. If using the above class, what would the name of the config file be? would this be the name of the DLL that is calling it as per a Windows EXE ie : myexe.exe.config. I have named my X...more >>

click once or windows installer or update block?
Posted by DBC User at 6/7/2006 11:56:02 AM
Hi All, I asked this question in clickonce forum and no one seems to answer so I thought I will ask a border experts. I have an application, which uses 2 different set of files based on the use. On one instance the application might use both the file sets and in some other installs it might...more >>

Strip Hyperlinks Out Of An HTML String For Export to Excel ASP.NET
Posted by Jared at 6/7/2006 11:44:21 AM
Hi I have been trying to find an easy way to strip the hyperlinks out of an html string to make exporting ASP.NET GridView's to Excel a bit more user friendly. Couldn't find anything in these groups, so I have written this code which will work fine as long as you don't use the ">" character i...more >>

How do you know when a socket disconnects
Posted by DaTurk at 6/7/2006 11:38:30 AM
I want to know when a socket disconnects so I can attempt to reconnect. Is there any special type of pattern to doing this? Is there an evnt raised? ...more >>

DateTime.Now not working?
Posted by Bryce K. Nielsen at 6/7/2006 11:30:46 AM
I have a Form that has a method that sets a label's text to DateTime.Now.ToString(). Strange thing is, when I call the form twice from the same app, the label shows the old DateTime value. It's almost as though either the Form didn't get recreated, or if the DateTime didn't reflect the curre...more >>

Using Microsoft.VisualBasic.Logging from a C# .Net 2.0 aspx page?
Posted by Tom Kearney at 6/7/2006 10:23:04 AM
Hi - I'm trying to use "Microsoft.VisualBasic.Logging.FileLogTraceListener" from a set of C# aspx web pages, but I can't seem to use: <%@ Import Namespace="Microsoft.VisualBasic.Logging" %> I get a compilation error (Compiler Error Message: CS0234: The type or namespace name 'Logging' does...more >>

Accessing Unmanaged Data (C++) from .NET
Posted by Frustrated at 6/7/2006 9:53:43 AM
Since C# and VB.NET are similar, I am posting this here also I have a C++ DLL that I need to access from VB.NET or C#. The following is my attempt via VB.NET. The function I am trying to call is declared like this: void* PASCAL iidc_lockdata( HIIDC, long frame = -1 ) This function retu...more >>

Web Browser Secuirty
Posted by John J. Hughes II at 6/7/2006 8:22:37 AM
In the MS report viewer example "Microsoft.Samples.ReportingServices.RSExplorer" they use the system default credentials to get the list of reports on the report server. The example them opens a WebBrowser to display the reports which prompts the user for a user name and password in certai...more >>

UI not responding
Posted by sprayer at 6/7/2006 7:54:00 AM
I have a UI thread not responding also. I have an Async operation that I am processing a long running SQL script in ADO.Net. I am executing the Command asynchronous and hooking the SqlCommand.StatementCompleted. I then use AsyncOperation to post events back to the UI thread. The UI thread t...more >>

Getting physical address/ MACID of network device
Posted by Macca at 6/7/2006 6:57:03 AM
Hi, I am using an asynchronous socket server to allow comms between multiple clients and my server. I know how to obtain the IPAddress of the client (network device) as shown below :- string sensorIPAddress = ((IPEndPoint)handler.RemoteEndPoint).Address.ToString(); bu...more >>

C# Interface methods gets wrong prototype when using COM interop
Posted by kli NO[at]SPAM scandpowerpt.com at 6/7/2006 6:35:01 AM
I have a very peculiar problem. I have a c# class library that a access from a C++ MFC client through COM introp. This work almost well. One special interface method is translated wrong when exporting to a .tlb file and importing it into the client app. The C# interface method snippet: namesp...more >>

Boolean operations on Enumerations
Posted by Shawnk at 6/7/2006 6:29:02 AM
I would like to perform various boolean operations on bitmapped (FlagsAttribute) enum types for a state machine design as in; ------------------- [FlagsAttribute] enum portState { Unknown, Open, Active, Secure, Requester_trace_requested, Requeste...more >>

Is there a way to get a list of file names from within a directory
Posted by jpabich at 6/7/2006 6:04:30 AM
I want to display a list of filenames that exist in a certain directory. How do I go about loading this list? ...more >>

How to set the dataGrid height to fit exactly ?
Posted by Sharon at 6/7/2006 5:48:02 AM
I have a DataGrid that contains a few rows and column header. I wish to change the DataGrid height to be the exact height of the total height of the rows and column header, so that no gray area will be shown below the last row. I tried: int totalRowsHeight = dataTable.Rows.Count * (data...more >>

Problem with dataset in .NET 2.0 Update requires a valid UpdateCom
Posted by Shaun O''Callaghan at 6/7/2006 5:38:02 AM
Hi All, I have a typed dataset on a Windows form on Smart Device Application that displays data from a Sql Server Mobile database. The problem is, whenever I want to add a new record I first make a call to: myTableBindingSource.AddNew(); and this inserts a blank row. When I've compl...more >>

Why is Installer.commit not called whn installing on W98
Posted by Dave at 6/7/2006 3:21:01 AM
I have a standard ProjectInstaller class derived from Installer, and I have overridden the Commit method to do some custom processing. It works fine under XP but when I do the install on W98 the Commit method doesn't seem to get called at all. Can anyone explain this? I'm using VS2003/.NET1.1....more >>

IEnumerable vs IEnumerable<T>
Posted by nick_tucker NO[at]SPAM hotmail.com at 6/7/2006 2:47:24 AM
Hi, Could someone tell me which of the following is correct if I want to make the MyCollection class below enumerable public class MyCollection:System.Collections.IEnumerable { private List<MyItem> m_MyItemsList System.Collections.IEnumerator System.Collections.IEnumerab...more >>

Weird result of incrementor?
Posted by kelmen NO[at]SPAM hotmail.com at 6/7/2006 1:15:40 AM
Try the below simple program. It give expected result. 1 1 2 2 Then toggle the statements in private static int sinc(), to use Test._num ++ . The result: 0 0 1 1 is this result acceptable? Its not expected by me. static void Main(string[] args) { Test obj1 = new Test(); ...more >>

What is the use of interface
Posted by Raja Chandrasekaran at 6/7/2006 12:55:05 AM
Hai friends, I really wonder, If the interface does not have any definition, Y do we need to use interface. You can then only we can use Multiple inheritance. I really cant understand, Just for declararion y do we need to use interface. Anyhow the method name and definition ll be in...more >>

C# and GDI Resources
Posted by Ian Semmel at 6/7/2006 12:00:00 AM
In MFC programming, you have to carefully check usage of GDI resources (eg dispose of them when no longer needed). Does the same apply to C# and .NET ? eg if I have Font f = new Font (); ..... use it f = new Font (); Do I have to put f.Dispose() in prior to the second new or does...more >>

Good OO organization os statistics data
Posted by Allan Ebdrup at 6/7/2006 12:00:00 AM
Hi We have a large class library of different classes, now we are going to implement a lot of usage statistics that we need, stuff like how many times a user has logged in, how many times a message has been read, how many times a ad has been shown and so on. Now I'm wondering what would be a...more >>

Toolstrip menu items in C# 2.0
Posted by Ludwig at 6/7/2006 12:00:00 AM
My application has a main tool strip menu (File, Options, help,...). There are also a number of context menu's that popup. Some main menu items should also be available in some context menu's. Is there a way of defining these shared menu items once, and merge them in the main menu and contex...more >>

How do I get a changed value back from C#
Posted by tony at 6/7/2006 12:00:00 AM
Hello! Assume I have an C++.net function called loadPostNames see below. loadPostNames( dialog->GetAllPostNames(index) ); This function loadPostNames have GetAllPostNames(index) as a parameter. Function GetAllPostNames is a method in C#. Now to my question this identifier index passed as a...more >>


DevelopmentNow Blog