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 thursday june 15

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

True or False?
Posted by Brian at 6/15/2006 11:56:12 PM
State True or False: If you set AutoGenerateColumns=True and still provide custom column definitions, the DataGrid will render both. o True o False Someone said true but someone said false. Which is right? Thanks. ...more >>

Multiple Unit Scalar
Posted by Stephan Rose at 6/15/2006 11:50:19 PM
In one of the applications I am developing I have need of working with numbers in varying unit system. I might be adding 5 mil to 1 inch or whatever. What I have come up with works really well, however...it moves about as fast as a honda civic trying to tow a semi truck. The basic definiti...more >>

Doubt related to windows based timer.
Posted by archana at 6/15/2006 11:44:43 PM
Hi all, I am having one confusion regarding windows based timer. I read somewhere that 'Be careful with stopping, because stopped timers are disabled and are subject to garbage collection. That means that stopped timers can not be started again.' I have one application containing sta...more >>

Undo deletions in DataGridView
Posted by Michael A. Covington at 6/15/2006 10:53:13 PM
Any thoughts about how best to implement "undo most recent deletion" in a DataGridView in which the user is allowed to delete rows (but not edit their contents)? Is it as simple as stashing a copy of the DataGridView before doing the deletion, and swapping it back in if the user hits Undo? ...more >>

How to format tooltip text?
Posted by Scirious at 6/15/2006 10:38:29 PM
People, how can i get my tooltip text to be formatted so i can change the color of portions of the text and even use italic or bold along my text? TIA, Scirious....more >>

A quick question for IL and C#
Posted by Brian at 6/15/2006 9:33:46 PM
A quick question here - What can be achieved in IL which is not possible in C# ? o Creation of an ArrayList o Creation of a Dictionary o Creation of a two dimensional array o Creation of a non-zero based array Please let me know what is the right answer. Many th...more >>

What may be wrong here?
Posted by Scirious at 6/15/2006 6:28:36 PM
People, I'm working in a project in Asp.Net 1.1 where I need to record some info in an Oracle database. To do such, there is an object that stores some this info, including a date in a string variable. Something that is gotten this way. DateTime dt = new DateTime.Today; string date = dt....more >>

checking for paticular value
Posted by Vikas Kumar at 6/15/2006 6:26:04 PM
i have string of first 5 numbers not necessary of length 5 eg: "1235" or "3421" or "12345" now i want to check wether 3 is present in string or not or 5 is present in given string or not how can i do that ...more >>



How to report a bug to MS?
Posted by Scirious at 6/15/2006 6:20:42 PM
People, the way Windows.Forms TabControl draw itself is buggy. I the tabs page are on top of the control it is ok, but if it is set to the right, left or botton of the control it just doesn't draw the way it should. At this point Java draw it better. I'm not sure, however, if I'm trying to use...more >>

Getting components list
Posted by Aleksey at 6/15/2006 5:34:54 PM
Hi, all! Is there any standard way to get list of all components on my win form, including components that their parent isn't form it self, but panel on the form? Or to get this list I need create recursive function? (In Delphi there is property - list of all including components) Thank...more >>

Possible to override static member in base class?
Posted by Dave Booker at 6/15/2006 5:25:01 PM
It looks like the language is trying to prevent me from doing this sort of thing. Nevertheless, the following compiles, and I'd like to know why it doesn't work the way it should: public class ComponentA { static string s_name = "I am the root class."; public string Name { get {return...more >>

Drag and Drop multiple items
Posted by Rob at 6/15/2006 5:23:47 PM
I've searched for info on how to drag and drop a group of strings (or any other object) from one control to another. Looked through articles by Dino Esposito, checked the Forms books by Sells and MacDonald. You'd think it would be there. Anyone know?...more >>

find a value ona datagridview
Posted by paolol at 6/15/2006 5:16:22 PM
Hi, I have a datagridview and at the doubleclick event I will like to open a new window with a collection of data from an ADO DB , but I don't know how to get the value of a cell in the clicked row :| Help please :) Paolol...more >>

How to implement "default(T)" for a given Type
Posted by Jeff Brown at 6/15/2006 5:05:30 PM
Hi, I'm trying to implement the functionality of the generic expression, "default(T)", but for a given instance of the Type class. The ideal would be if the Type class had a method like "object Type.MakeDefaultInstance()" -- but it doesn't. Here's my attempt, but it seems rather kludgy....more >>

Use command line option '/keyfile' or appropriate project settings instead of 'AssemblyKeyFile'????
Posted by SenthilVel at 6/15/2006 4:54:40 PM
Hi I am in the Process of conversion of my existing 1.1 Dotnet Code to 2.0 framework. for each project when i compile in VS2005 , i get this error\warning: Use command line option '/keyfile' or appropriate project settings instead of 'AssemblyKeyFile' Question : 1. which is the be...more >>

How to use ISupportInitialize
Posted by Andrew at 6/15/2006 3:21:04 PM
I am implementing ISupportInitialize on my component as follows: public class BOCConnector : Component, IListSource, ISupportInitialize But BeginInit and EndInit are not being called. When the IDE is opening the form in design mode with this component already on it I need the component to...more >>

table to object converter
Posted by abentov at 6/15/2006 2:35:30 PM
Hi, I have a sample class – let’s say Person. It has the following fields: Id:int Name:string Address:string I would like to reuse this class over different projects. In all of them I need to bee able to store and retrieve the Person’s fields into/from a Data Base. All Data Base...more >>

Optimizations to Reduce Memory Consumption and Minimize Paging
Posted by Mike S at 6/15/2006 2:31:22 PM
I'm working on a .NET application that was under development by a previous developer, who is no longer working with the company. The program basically extracts records from a source database and outputs them in an XML document, mapping the source records into a third-party XML schema. The mappin...more >>

real-life example of generics??
Posted by VMI at 6/15/2006 2:13:01 PM
I understand the principle behind generics, but I'm not sure how I can apply them to a real-life situation. Anybody have an example that shows how someone can benefit from a generic class? The less complicated it is, the better :-) Thanks....more >>

convert time string to number of seconds
Posted by tony at 6/15/2006 2:09:34 PM
Hello! I have this method ConvStdTimeToSec here that convert format hh:mm:ss into total number of seconds and return it. I just wonder if there exist a metod in the .NET framework that can be used instead. private int ConvStdTimeToSec(string time) { return int.Parse(time.Substring(0,...more >>

Forms show and hide..
Posted by DBC User at 6/15/2006 1:45:09 PM
I am wondering is there any way when I do a show and hide of a form, we can do a smooth transition to the new screen like power point presentation in c#?? Thanks. ...more >>

How to get property name?
Posted by Brett Romero at 6/15/2006 1:19:12 PM
if I have a public static property such as: //Class1 public class Class1 { public static Dictionary<string, string> Prop1{...} public static Dictionary<string, string> Prop2{...} } //SomeClass public class SomeClass { public SomeClass ( CustomDictionary<string, string> pdic...more >>

Ordinal for DateTime.ToString()
Posted by Dylan Parry at 6/15/2006 1:07:03 PM
Hi folks, I was wondering if there is any way of formatting a date to include the ordinal characters? I've looked at the documentation for DateTime.ToString(), but no where can I find information on ordinals. For example, I currently use: Console.WriteLine(myDate.ToString("d MMMM, yyyy"...more >>

Raising an event outside of the class
Posted by George at 6/15/2006 12:26:02 PM
Hi, I have searched on the net quite a bit, but the more I read, the more confused I get. I want to see if I can raise an event out side of the class. I believe this can be done in VB (at least VB 6.0) by calling raise event .... For example, Say if I have a button control, and wrot...more >>

DateTime, but why no Date class?
Posted by Mantorok at 6/15/2006 12:24:45 PM
Hi all I've never really been a fan of always having to use a DateTime type when 9/10 times I only want to store a Date. The main problem I've got now is that I have some user controls and I want to determine whether the DateTime value I have should be displaying the date-only or both da...more >>

datagrid and web controls
Posted by Phil Townsend at 6/15/2006 12:13:42 PM
I have a datagrid control that gets populated from a dataset in a code-behind file. In addition to some text fields the data contains three smallint fields that can either be a 1 or 0. When the datagrid gets populated I want a checkbox to be displayed for those fields that is either checked or u...more >>

ToString() does not exist ... anywhere !
Posted by John A Grandy at 6/15/2006 11:44:26 AM
In .NET v1.1.4322 , in a VS.NET application , has anyone ever run into the bizarre situation where at runtime .NET believes that the ToString() method does not exist ... Sometimes this problem will show up as a runtime exceptions, sometimes this problem will only be clear via QuickWatch in ...more >>

Sort a Data reader
Posted by John at 6/15/2006 11:18:11 AM
Hi, Is there a way to sort a datareader based on certain columns? TIA ...more >>

Finding mysterious Application Settings
Posted by Dave Booker at 6/15/2006 11:17:01 AM
When I run a particular application I've been working on for a while, it somehow finds a value for the Application Setting "Test.Properties.Settings.Default.ProjectPath", but I can't see where it is acquiring the value! I have been through all of the project's Properties, and read through e...more >>

Getting distinct fields from a dataset
Posted by Mike9900 at 6/15/2006 10:55:02 AM
Hello, I have this data in a DataSet: Year Account Amount 1995 1 999 1995 2 323 1995 3 321 1996 1 354 1996 2 434 I want to get the distinct number if years, in this instance 1995 and 1996 in on...more >>

Newbie: application architecture best practices
Posted by Underflow at 6/15/2006 10:23:20 AM
G'moring folks, My apologies if this is an RTFM type question... I'm starting in C# after working in other languages for a while. I can write simple console apps all day long, but the number of structure choices when making larger-scale C# apps is somewhat mind-boggling. Does anyone have...more >>

C# ASP example for Excel won't work for us
Posted by George Ellis at 6/15/2006 10:06:11 AM
A couple of use have been trying to figure out why we are not getting anywhere with this example. http://support.microsoft.com/default.aspx?scid=kb;en-us;306572 ============ using System.Data.OleDb; using System.Data; // Create connection string variable. Modify the "Data Source" // parame...more >>

Cant update StatusStrip items from working thread
Posted by Benny at 6/15/2006 9:00:35 AM
I have a GUI and a working thread. I have used just regular labels and used callbacks to update the text on the GUI thread until now. I have added a status bar with 2 labels i need to be able to change and 1 status bar. None of the actual items on the status bar have a "InvokeRequired" property...more >>

Reading XML with HTML tags
Posted by emferrari NO[at]SPAM gmail.com at 6/15/2006 8:54:02 AM
Hi all I have a XML file with the following: <Step step="1"> <Text><b>Chapter 1</b> This is a test. Click <b><i>Load</i></b> </Text> </Step> I'd like to read this node and bring the HTML tags as well. I'm reading using node["Text"].InnerText but looks like the InnerText remove the HTM...more >>

my rant on value types and accessors
Posted by The Petar at 6/15/2006 8:20:28 AM
I am really unhappy that C# accessors are not powerful enough to mimic as if you were accessing an class field. In particular, let S be: public struct S { public int v; public void change () { v = 99; } } Let C be: public class C { public S s; } Then I could change the val...more >>

C# project reference problems (reference pulled from obj folder, not bin folder).
Posted by Richard J Foster at 6/15/2006 8:20:24 AM
Hi there, I have a pair of C# projects in VS2003. The first project, a dll, is referenced in the second via a project reference. The assemblies in question are delay-signed during a "production" build process, but not as part of a normal development build. I have noticed that while the co...more >>

.Net remoting call from Excel macro?
Posted by balaji at 6/15/2006 8:03:08 AM
Hi all, Is there a way to use .Net remoting via Excel macros?. I want to do is if a particular cells in the excel file changes, my .Net applicaiton need to be notified about this. Is there any other way of interprocess communicatin between excel and my app? All i need is my application loads ...more >>

Activator.CreateInstance and .NET 1.1 SP1 causes exception
Posted by Ryan.Mohammed NO[at]SPAM gmail.com at 6/15/2006 7:11:36 AM
I have a problem that does not happen without .NET 1.1 however it does happen on machines that have .NET 1.1 SP1 installed. Createinstance attempts to create an instance of ICEBOX.dll which references usbComm.dll. Has anyone encountered this before? Ryan ************** Exception Text ******...more >>

ref
Posted by Lamis at 6/15/2006 6:19:01 AM
Hello; I have 3 projects, project 1 + 2 are vb.net, project 3 in C# project 3 : (C#) public Class3(project2 x) project 1 public sub () dim y as project2.class2() dim x as project3.class3 = new project3.class3(y) end sub All I need to do is to send a referense of a third class betw...more >>

write to application event viewer
Posted by sk.rasheedfarhan NO[at]SPAM gmail.com at 6/15/2006 5:49:23 AM
Hi all, According to my project requirement I have to write the NT Event information of SQL Server into EventLog viewer. For more clear I want to write the following information into Application log file: ---------------------------------------------------------------------------= =AD---...more >>

Updating UI of another form
Posted by lucaoscar NO[at]SPAM gmail.com at 6/15/2006 2:06:22 AM
Hi all, as you can see from the level of my question, i am pretty new to c# and programming in general. situation: i would like to update the UI of a form (main form of my application) from a second form (which was called from the first). Ideally when a button on the second form is pressed,...more >>

unknown parameters
Posted by Howard at 6/15/2006 1:56:15 AM
Can c# pass a unknown number of parameters like in javascript? the parameters could be different types eg. myMethod(string a, param) { int a = param[0]; string b = param[1]; } ...more >>

Is there anyone skilled in windows services?
Posted by Giulio Petrucci at 6/15/2006 12:00:00 AM
Hi everybody, I've a big problem with a Windows Service I've created using C#. It's a very simple service: it just starts a TcpListener listening for incoming connections on a certain ports. First I compiled it on FW2.0, and run the service without any problem. Some days ago I had to perfor...more >>

C# String Trim() Error!
Posted by Dat K. AU DUONG at 6/15/2006 12:00:00 AM
Hi, C# Annoying string function or Am I doing Something wrong? In VB6/VB.NET I can code like: value = value.trim() and it just work! But in c#, I event put in the additional check I still get the error. if (value.Length > 0 && value != string.Empty){ value = value.trim(); } The...more >>

Installing files in a location only known at runtime
Posted by Simon Hart at 6/15/2006 12:00:00 AM
Hi, I am creating a MergeModule that is required to read the Windows Registry to determine a location only known at runtime and install files. What I can't figure out is, how to change the DefaultLocation property of the File Installation Properties? My thinking is this needs to be done ...more >>

how to create my own tool box control
Posted by Yoshitha at 6/15/2006 12:00:00 AM
Hi Is it possible to create my own tool box control (in c#.net) on which i can place the controls i've created or some other controls which already exisits? Can anyone tell me how to do this? or if you know any third party control which act as a tool box control please let me know. Thanx i...more >>

How do I fill with 0 where nessessary when dealing with time.
Posted by tony at 6/15/2006 12:00:00 AM
Hello! I have this method that take number of seconds(numOfSec) and convert this into a string with this format hh:mm:ss. Now to my question there is a small problem when I have time component that is < 10. If I pass 7862 seconds to this method I get back "2:11:2" but I want to get back "02:...more >>

RTF to TEXT
Posted by Peter Hale at 6/15/2006 12:00:00 AM
Hi all I'm doing a conversion and I need to convert an RTF field to TXT . ie the input field ( read from a SQL table ) using a DataReader is in RTF fomat - the output to another system needs to be in Text format - is there an easy way to remove the formatting and only leave the text ...more >>

how to protect my codes
Posted by zeeway at 6/15/2006 12:00:00 AM
hi,every one! I have an urgent question. My codes need to be published now,but I learn programs produced with .net are very easy to be reverse-engineered. Could anyone give me some sugguestions to protect my c# codes? Crespo 2006-06-15 ...more >>

Cant get the pointers to work in c#
Posted by Patrick at 6/15/2006 12:00:00 AM
Hi, I have been trying to get the pointers to work in c#, i was told that you have to set Allow unsafe code in your application properties and that should do the trick, but it still dosent work, i keep getting Pointers and fixed size buffers may only be used in an unsafe context. Any help wou...more >>


DevelopmentNow Blog