473,503 Members | 1,635 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trying to add an image to a control...

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
Nov 21 '05 #1
4 1123
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

"YYZ" <no**@none.com> escribió en el mensaje
news:%2****************@TK2MSFTNGP14.phx.gbl...
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

Nov 21 '05 #2
YYZ
"Carlos J. Quintero [.NET MVP]" <ca*****@NOSPAMsogecable.com> wrote in
message news:%2****************@tk2msftngp13.phx.gbl...
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.
Nov 21 '05 #3
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
Nov 21 '05 #4
YYZ
>> 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.


Good! I'll post there. Thanks.
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! ;-)


LOL.

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
28139
by: Ed Landau | last post by:
In VB6.0, I can put an image on a form and assign it's .picture property at run-time. In VBA (within MS Access), when I put down an image control on a form, it asks me for the source to the image...
6
9206
by: Larry R Harrison Jr | last post by:
I have Access XP, and the following code which is supposed to assign a JPEG to an image control: Me.Image9.Picture = "F:\Pictures\CP775_SonyDSCP50\FingerRockNight_Resize.jpg" I get this error...
10
4127
by: David W. Simmonds | last post by:
I have a DataList control that has an Image control in the ItemTemplate. I would like to resize the image that goes into that control. I have a series of jpg files that are full size, full...
25
4028
by: Neo Geshel | last post by:
This works: <form> <asp:TextBox id="name" /> <%= name.ClientID %> </form> But this DOES NOT work: <form>
3
7945
by: David Thielen | last post by:
Hi; I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images ...
1
9463
by: Brian | last post by:
Using A2K I have an image control on a report and use code to set the image.picture to the required jpg. 3 of the jpgs resize properly but 2 do not - they display much smaller than the image...
13
2275
by: Joe | last post by:
does anyone know why this source code throws an error?? Dim myBitmap As System.Drawing.Bitmap Dim myGraphics As Graphics myBitmap = New System.Drawing.Bitmap(fileName:="C:\test.tif")...
0
1361
by: SayamiSuchi | last post by:
hi I have taken one image control("image1") in the form("frmForm1.aspx").Now i want to one image ("mypic.jpeg") whose size is larger than the image control i.e image1.When i run the program, the...
6
3201
by: Doogie | last post by:
Hi I have an img control I am trying to hide upon certain types of commands in my code behind. When to hide it is directly tied to a asp:dropdownlist control. So depending on what the user...
0
7086
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7280
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
382
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.