Click here to Skip to main content
16,007,687 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# key/mouse detection Pin
Robin Panther23-Feb-06 21:45
Robin Panther23-Feb-06 21:45 
QuestionGDI TextOut and System.OutOfMemoryException Pin
Draders2323-Feb-06 8:10
Draders2323-Feb-06 8:10 
Questionc# desktop database application Pin
stefan1223-Feb-06 7:40
stefan1223-Feb-06 7:40 
AnswerRe: c# desktop database application Pin
Sean8923-Feb-06 8:48
Sean8923-Feb-06 8:48 
GeneralRe: c# desktop database application Pin
stefan1223-Feb-06 9:19
stefan1223-Feb-06 9:19 
GeneralRe: c# desktop database application Pin
Sean8923-Feb-06 9:33
Sean8923-Feb-06 9:33 
AnswerRe: c# desktop database application Pin
André Ziegler24-Feb-06 1:54
André Ziegler24-Feb-06 1:54 
QuestionConstructors at design time Pin
SteelIXB23-Feb-06 7:31
SteelIXB23-Feb-06 7:31 
I'm not sure how I would go about how to get a control to create an object specifically for one of it's properties.

For example, say I have a class called 'LayoutSystem', with the constructor 'LayoutSystem(int width, int Height)', and on the main form I have a control with the property 'LayoutSystem' of type 'LayoutSystem'

The code I currently have would generate this:

LayoutSystem layoutSystem1 = new LayoutSystem();<br />
<br />
...<br />
layoutSystem1.Width = 100;<br />
layoutSystem1.Height = 200;<br />
control1.LayoutSystem = layoutSystem1;<br />



but instead I need the code to generate like this:

<br />
control1.LayoutSystem = new LayoutSystem(100, 200);<br />


I'm not sure what this would be called, and I've searched all over for something about it, but I can't find anything.

Also, I don't know if I would have to go about it differently if say in that constructor in the second bit of code, i had another constructor:

<br />
control1.LayoutSystem = new LayoutSystem(100, 200, new LayoutSystem[] { (LayoutSystem) new LayoutSystemChild(50, 100), (LayoutSystem) new LayoutSystemChild(50, 100)});<br />


... in that case the constructor would be LayoutSystem(int width, int height, LayoutSystem[] childLayoutSystems)
I've spent hours trying to find something on this, but I can't seem to find anything.

-- modified at 13:51 Thursday 23rd February, 2006
AnswerRe: Constructors at design time Pin
SteelIXB23-Feb-06 8:45
SteelIXB23-Feb-06 8:45 
GeneralRe: Constructors at design time Pin
Dan Neely23-Feb-06 9:04
Dan Neely23-Feb-06 9:04 
QuestionReading CSV Pin
john3423-Feb-06 7:26
john3423-Feb-06 7:26 
AnswerRe: Reading CSV Pin
Guffa23-Feb-06 7:35
Guffa23-Feb-06 7:35 
GeneralRe: Reading CSV Pin
john3423-Feb-06 9:08
john3423-Feb-06 9:08 
AnswerRe: Reading CSV Pin
Guffa23-Feb-06 10:09
Guffa23-Feb-06 10:09 
GeneralRe: Reading CSV Pin
john3423-Feb-06 10:32
john3423-Feb-06 10:32 
QuestionMonitoring Threads in C# and Windows CE Pin
AISchreiber23-Feb-06 7:24
AISchreiber23-Feb-06 7:24 
QuestionCombobox question Pin
VPMahank23-Feb-06 7:00
VPMahank23-Feb-06 7:00 
AnswerRe: Combobox question Pin
Draders2323-Feb-06 8:20
Draders2323-Feb-06 8:20 
GeneralRe: Combobox question Pin
VPMahank23-Feb-06 12:03
VPMahank23-Feb-06 12:03 
Questiondisplay calendar in: days, weeks, month and year Pin
Andre da Silva Carrilho23-Feb-06 6:53
Andre da Silva Carrilho23-Feb-06 6:53 
QuestionIndexOutOfRangeException during OnPaint Pin
Pseudo Quasi23-Feb-06 6:32
Pseudo Quasi23-Feb-06 6:32 
AnswerRe: IndexOutOfRangeException during OnPaint Pin
Nicholas Butler23-Feb-06 8:05
sitebuilderNicholas Butler23-Feb-06 8:05 
QuestionDataSet to CSV file Pin
zaboboa23-Feb-06 6:12
zaboboa23-Feb-06 6:12 
AnswerRe: DataSet to CSV file Pin
Colin Angus Mackay23-Feb-06 12:20
Colin Angus Mackay23-Feb-06 12:20 
Questioncan't get Texture to draw in DirectX Pin
melanieab23-Feb-06 5:22
melanieab23-Feb-06 5:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.