By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,317 Members | 1,313 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,317 IT Pros & Developers. It's quick & easy.

UserControl

P: n/a
I have a usercontrol that inherits from PictureBox control. I've added a
textbox to the usercontrol. How do I get the textbox to show up on the
usercontrol picturebox?
--
Dennis in Houston
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
hi,

Add the textbox to the pictureboxes controls.

me.controls.add(mytextbox)

Ken
----------------
"Dennis" <De****@discussions.microsoft.com> wrote in message
news:E4**********************************@microsof t.com...
I have a usercontrol that inherits from PictureBox control. I've added a
textbox to the usercontrol. How do I get the textbox to show up on the
usercontrol picturebox?
--
Dennis in Houston
Nov 21 '05 #2

P: n/a
You'd have an easier time of it if you inherited from Container, either
directly or indirectly, such as via a class like UserControl. Since
PictureBox doesn't inherit from Container in any way, it can't easily
contain other controls such as TextBox controls. The conventional way to do
this is to inherit from UserControl.

Tom Dacon
Dacon Software Consulting

"Dennis" <De****@discussions.microsoft.com> wrote in message
news:E4**********************************@microsof t.com...
I have a usercontrol that inherits from PictureBox control. I've added a
textbox to the usercontrol. How do I get the textbox to show up on the
usercontrol picturebox?
--
Dennis in Houston

Nov 21 '05 #3

P: n/a
I had it added but it doesn't show up in the picture box. Do I have to
redraw it in the picture box paint event and if so, how do I do this.

"Ken Tucker [MVP]" wrote:
hi,

Add the textbox to the pictureboxes controls.

me.controls.add(mytextbox)

Ken
----------------
"Dennis" <De****@discussions.microsoft.com> wrote in message
news:E4**********************************@microsof t.com...
I have a usercontrol that inherits from PictureBox control. I've added a
textbox to the usercontrol. How do I get the textbox to show up on the
usercontrol picturebox?
--
Dennis in Houston

Nov 21 '05 #4

P: n/a
Sounds like the User Control is what I need. Thanks.

"Tom Dacon" wrote:
You'd have an easier time of it if you inherited from Container, either
directly or indirectly, such as via a class like UserControl. Since
PictureBox doesn't inherit from Container in any way, it can't easily
contain other controls such as TextBox controls. The conventional way to do
this is to inherit from UserControl.

Tom Dacon
Dacon Software Consulting

"Dennis" <De****@discussions.microsoft.com> wrote in message
news:E4**********************************@microsof t.com...
I have a usercontrol that inherits from PictureBox control. I've added a
textbox to the usercontrol. How do I get the textbox to show up on the
usercontrol picturebox?
--
Dennis in Houston


Nov 21 '05 #5

P: n/a
Hi,

myPicturebox.bringtofront ?

Ken
-------------------
"Dennis" <De****@discussions.microsoft.com> wrote in message
news:C9**********************************@microsof t.com...
I had it added but it doesn't show up in the picture box. Do I have to
redraw it in the picture box paint event and if so, how do I do this.

"Ken Tucker [MVP]" wrote:
hi,

Add the textbox to the pictureboxes controls.

me.controls.add(mytextbox)

Ken
----------------
"Dennis" <De****@discussions.microsoft.com> wrote in message
news:E4**********************************@microsof t.com...
I have a usercontrol that inherits from PictureBox control. I've added a
textbox to the usercontrol. How do I get the textbox to show up on the
usercontrol picturebox?
--
Dennis in Houston

Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.