Set the parent of a control at runtime
The Parent property on every control is only read-only at runtime. What other way would I set the parent of any control at runtime? I Have tried "SetParent" but it won't work for label control (doesn't have hWnd property) and don't know why it doesn't respond to any event when it's showed up on it's new parent form.
Re: Set the parent of a control at runtime
Quote:
Originally posted by abdul
The Parent property on every control is only read-only at runtime. What other way would I set the parent of any control at runtime? I Have tried "SetParent" but it won't work for label control (doesn't have hWnd property) and don't know why it doesn't respond to any event when it's showed up on it's new parent form.
Sorry for this question, but *** is Parent?, and what blade's code does? :D
Re: Re: Set the parent of a control at runtime
Quote:
Originally posted by Stiletto
Sorry for this question, but *** is Parent?, and what blade's code does? :D
Parent property of a specific control contains the object that this control in placed on. Blade's code doesn't work yet.
BTW, are you drunk?;)
Re: Re: Re: Set the parent of a control at runtime
Quote:
Originally posted by abdul
Parent property of a specific control contains the object that this control in placed on. Blade's code doesn't work yet.
BTW, are you drunk?;)
Me, no...
So you mean like this:
VB Code:
Form1.Command1.Container = Form1
?
Re: Re: Re: Re: Set the parent of a control at runtime
Quote:
Originally posted by Stiletto
Me, no...
So you mean like this:
VB Code:
Form1.Command1.Container = Form1
?
Maybe this will work but I want to go from one form to another like this:
VB Code:
Form1.Command1.Container = Form2