Trying to add an image to a control...

  • Thread starter Thread starter YYZ
  • Start date Start date
Y

YYZ

I'm trying to do something kind of strange...what we want is a textbox
control, but that has a "New" image inside of it, always on the far right
edge of it. This image needs to be clickable and also let the text appear
over it.

I am trying to create a usercontrol to handle this, but I can't get my head
around it. Any ideas from anyone out there?

I'm pretty new to .Net, but I'm not new to programming.

Matt
 
Couldn´t the image be a graphical button to the right of the textbox rather
than inside it? That's easy to do with a usercontrol, but to get an image
inside the textbox will require a custom-draw usercontrol, much more
complicated.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
 
Carlos J. Quintero said:
Couldn´t the image be a graphical button to the right of the textbox
rather than inside it? That's easy to do with a usercontrol, but to get an
image inside the textbox will require a custom-draw usercontrol, much more
complicated.

We are trying to get away from that -- the ideal is to have the image hosted
inside of the usercontrol, always on the right hand side (ie, move along
with the textbox as it is resized, etc.), looking very washed out,
clickable, and text could appear over it. That is in a perfect world...

If I went the custom-draw usercontrol route, would I have to do all the
things like control the caret blinking and things like that?

Matt

PS -- long time user of MZTools for VB6, haven't yet installed the version
for .Net that you sent me...will do soon, though.
 
Hi Matt,
If I went the custom-draw usercontrol route, would I have to do all the
things like control the caret blinking and things like that?

I am not sure, but I don´t think so, you only need to care about the paint
event and the click event inside the image zone. Try posting in the
windowsforms newsgroups.
PS -- long time user of MZTools for VB6, haven't yet installed the version
for .Net that you sent me...will do soon, though.

Ok, hurry up! ;-)

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
 
If I went the custom-draw usercontrol route, would I have to do all the
I am not sure, but I don´t think so, you only need to care about the paint
event and the click event inside the image zone. Try posting in the
windowsforms newsgroups.

Good! I'll post there. Thanks.
Ok, hurry up! ;-)

LOL.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top