Mahesh Chand
posted
4021 posts
since
Oct 29, 2004
from
Philadelphia
|
|
Re: Difference !!!
|
|
|
|
|
|
|
|
|
|
|
Well, first line is adding _SomeControl to the control of "this" which is probably a Form. So it is adding _SomeControl to form's controls and will display it on the given position with given size. Second line of code setting _SomeControl.Parent to this (Form probably).
|
|
|
|
|
|
Mahesh Chand
posted
4021 posts
since
Oct 29, 2004
from
Philadelphia
|
|
Re: Difference !!!
|
|
|
|
|
|
|
|
|
|
|
Well, first line is adding _SomeControl to the control of "this" which is probably a Form. So it is adding _SomeControl to form's controls and will display it on the given position with given size. Second line of code setting _SomeControl.Parent to this (Form probably).
|
|
|
|
|
|
Majid Kamali
posted
166 posts
since
Jul 13, 2010
from
Iran, Tehran
|
|
Re: Difference !!!
|
|
|
|
|
|
|
|
|
|
|
I know that. Both of them Shows _SomeControl on Form. If i write first statement, second automatically become true (or viceversa) ?
|
|
|
|
|
|
Sunburn Developer
posted
47 posts
since
Oct 18, 2009
from
REAL HOT CHIKALI
|
|
Re: Difference !!!
|
|
|
|
|
|
|
|
|
|
|
The difference is that Add function is use to put componets like buttons, checkboxes, listboxes, rich text editors, etc... Components that goes inside a Windows Forms.
And the statement number two is use to set the parent of a windows form. But The parent windows form must be set as a MDI conteiner = true. Then you can add windows forms inside your mdi conteiner windows form. check this project.
|
|
|
|
|
|