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# > march 2008 > threads for sunday march 9

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

SplitterDistance has changed in OnFormClosing
Posted by Andrus at 3/9/2008 10:15:39 PM
I have .NET 3.5 WinForms application. This contains form with horizontal SplitContainer. I set SplitterDistance to 30 in OnLoad() However its value is 41 on OnFormClosing(). I want to obtain original value (30) for restore. Any idea why value is changing automatically and how to get real va...more >>


var for locals
Posted by Peter Morris at 3/9/2008 9:41:12 PM
var myObj = new MyClass(); What is the purpose of using "var" instead of "MyClass"? ...more >>

DllIport and char**
Posted by news.broadpark.no at 3/9/2008 6:50:31 PM
I have a problem interfacing a DLL written in Ada. In C++ I do as follows: typedef void(*pfGetItems)( char** ppsc, int num ); ..... pfGetItems GetItems = (pfGetItems)::GetProcAddress(hModule, "GetItems"); next I create the char array: char** pszBuf=new char*[num]; for (int i=0; i...more >>

Select a node after its created
Posted by John Rogers at 3/9/2008 6:48:59 PM
How do you keep the selection on a newly created treenode? After I hit enter, the selection always go back to the first root node. TIA ...more >>

about using property
Posted by Tony Johansson at 3/9/2008 6:32:22 PM
Hello! Below is a definition of a struct called Second. Now to my question as you can see this struct has field called value. The struct has a property connected to this field called Value which is a getter. For example when I want to read this value field from within a member in the str...more >>

Making Definitions
Posted by Devon-S at 3/9/2008 4:50:01 PM
Greetings, I am trying to make a definition like FormView.Insert. I have figured out how to make an eNum, but they seem to be attached to a subclass in VS2005. I have a class that displays three images of three size and I am hoping to make an ImageSize.Small, ImageSize.Medium, ImageSize.R...more >>

Event handling
Posted by tshad at 3/9/2008 4:17:44 PM
I have a sample program here that has one event with 2 different event handlers (onButtonAction and onButtonAction2). I had defined the event as: public event ButtonEventHandler ButtonClick; where ButtonEventHandler is a delegate type with 2 parameters: one is an object and the othe...more >>

Events
Posted by tshad at 3/9/2008 3:52:42 PM
I was looking at events and have the following code: ***************************************************8 using System; //declaring the event handler delegate delegate void ButtonEventHandler(object source, int clickCount); class Button { //Event Handler function public void on...more >>



DbConnection, DbDataReader and DbCommand
Posted by Jelle de Jong at 3/9/2008 3:52:28 PM
Hi all, I have a datasource and I want to connect to it like ADO.Net and build my own DbConnection and stuff. But I don't want to build my own SQL-parser. Does someone have a good idea to use SQL and implement it with my own DataReader? Or are there some good tutorials to build your own ADO...more >>

When Do You Need To Implement "GetHashCode?"
Posted by Dad at 3/9/2008 2:48:58 PM
Hi, A number of interfaces, e.g., IEqualityComparer, include GetHashCode. When does it need to be implemented? I usually just return 0 or 1. Thanks, Gary ...more >>

Define operator == and !=
Posted by Tony Johansson at 3/9/2008 12:53:03 PM
Hello! If I define operator == and != is then nessesary to override method Equals and GetHashCode that is inherited from System.Object ? If yes will Equals have the same functionalitty as operator == ? So can I then just restrict the functionality to one method and just call this metho...more >>

Why Linq-SQL generated code implements INotifyPropertyChanging
Posted by Andrus at 3/9/2008 12:15:17 PM
I noticed that sqlmetal generated code in northwind.designer.cs implements two interfaces: public partial class Customer : INotifyPropertyChanging, INotifyPropertyChanged { public string CustomerID { set { .... this.SendPropertyChanging(); this._CustomerID = value; ...more >>

window question
Posted by Analizer1 at 3/9/2008 12:11:32 PM
how to catch the event when a user clicks the system menu [x] to close a window is FormClosed and FormCloseing the correct Events thanks ...more >>

Access images subfolder of application root from exe in bin folder
Posted by Phil Johnson at 3/9/2008 12:09:03 PM
I have an exe that runs in the bin folder of the installed application root folder. I need to load some images dynamically which are in a folder called 'images' in a sub folder of the root folder. How can I access this folder at runtime from my exe running in the bin folder? Thanks. ...more >>

Load SQL Server db when application starts
Posted by Phil Johnson at 3/9/2008 12:03:00 PM
I have a C# app using a SQL Server db which is attached to my SQL Server, when I deploy though I want the app to lift (or load) the SQL Server at runtime so the user does not have to attach to the mdf file, I can just include it in my application folder and it will load when the application ...more >>

How can I access application settings?
Posted by Phil Johnson at 3/9/2008 11:54:02 AM
Hi, I have right clicked my project in VS2008 and added a DB Connection application setting. How do I access these settings from my code? I know this must be pretty simple, but I cannot see how to do it. -- Regards, Phillip Johnson (MCSD For .NET) PJ Software Development www.pjsoft...more >>

Mixinf fonts in a TextBox?
Posted by zacks@construction-imaging.com at 3/9/2008 10:46:09 AM
I have a multiline textbox control where I would like to load up with something like the following: This is Line 1 <- this line is NOT bold This is Line 2 <- this line is bold This is Line 3 <- this line is NOT bold I have attempted to use C# code like the foll...more >>

Attach Custom Principal to Thead on one form, not there on other f
Posted by Phil Johnson at 3/9/2008 10:34:00 AM
Hi, I have a WPF app written in C# 3.5 I have created a custom principal and attach it to the thread in my main window with the following code... CustomPrincipal principal = new CustomPrincipal(new CustomUser(), new string[0]); Thread.CurrentPrincipal = principa...more >>

casting question
Posted by Analizer1 at 3/9/2008 10:33:20 AM
i want to place child windows in a arraylist[] there floating property windows when the application closes if the child windows are open, I want to close that also my problem is how to cast to the open window i want to make a generic class to hold the open child windows thanks ...more >>

When is mvc going to be released? (non-beta)
Posted by DotNetNewbie at 3/9/2008 6:19:48 AM
Hi, Looking forward to mvc, do you guys know when the official release is going to be? Is it spring time?...more >>

Order of controls
Posted by ketaki at 3/9/2008 12:55:57 AM
Hello, I am working with Winforms (C#). I have created 2 user controls. 1 control (control1) is a big image and the other (control 2) is a small image. I am placing the control2 (small image) on control1(big image). When I invalidate the control the control2 gets hidden behind the control1. I...more >>


DevelopmentNow Blog