473,721 Members | 2,182 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Picturebox as a container

Is there a way in VB.NET to use a PicureBox as a container like in VB 6? I have an image that I want to place in a container and have transparent labels "float" on top of the image and use them as buttons. In VB 6, I used a PictureBox and that worked fine. In VB.NET, the labels background shows the same as the forms backcolor, not whatever color the image is behind it. I ran the conversion wizard to convert the project to VB.NET and it replaced the PictureBox with a Panel. The panel has a BackgroundImage property, but that shrinks the image and displays a bunch of them. Is there another container that will accomplish what I want?

Thanks!
Nov 20 '05 #1
2 6281
Hi,

When you set a controls background to transparent it takes the color
of it parent. Set the labels parent to the picturebox. Of course you will
have to reposition the labels.

Ken
-------------------
"Wade" <an*******@disc ussions.microso ft.com> wrote in message
news:AB******** *************** ***********@mic rosoft.com...
Is there a way in VB.NET to use a PicureBox as a container like in VB 6?
I have an image that I want to place in a container and have transparent
labels "float" on top of the image and use them as buttons. In VB 6, I
used a PictureBox and that worked fine. In VB.NET, the labels background
shows the same as the forms backcolor, not whatever color the image is
behind it. I ran the conversion wizard to convert the project to VB.NET
and it replaced the PictureBox with a Panel. The panel has a
BackgroundImage property, but that shrinks the image and displays a bunch
of them. Is there another container that will accomplish what I want?

Thanks!

Nov 20 '05 #2
* "=?Utf-8?B?V2FkZQ==?=" <an*******@disc ussions.microso ft.com> scripsit:
labels background shows the same as the forms backcolor, not whatever
color the image is behind it. I ran the conversion wizard to convert
the project to VB.NET and it replaced the PictureBox with a Panel. The
panel has a BackgroundImage property, but that shrinks the image and
displays a bunch of them. Is there another container that will


Are you sure the image is shrinked? It's tiled, but not shrinked.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

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

Similar topics

0
1465
by: Lopold VALLAURI | last post by:
Hi I have an Access file where is stored some JPG picture in an OLE Field Picture are stored with and OLE Container by access I would like to exract the image from field but without the OLE container ! Is there a API a Class or a lib to remove this OLE Container ? tank you for your help !
1
3428
by: Richard Saville | last post by:
I am trying to make a transparent pictureBox. MSDN says to use this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); for the form and this.pictureBox1.BackColor = Color.Transparent; for the pictureBox I does not seem to work. I have put this pictureBox on top of another one, but its background is gray and it blocks the image. What am I doing wrong? Thanks
0
1112
by: Johann Blake | last post by:
I am creating PictureBox controls at runtime in code and not at design time. These controls do get created and appear. These controls have a form as their container. Not all of the controls I create are shown at the same. The logic of my code is to sometimes show certain controls while hiding others and then later on reversing this. For some very strange reason, at some point when I want to display a control that was previously...
5
5791
by: Sharon | last post by:
I’m writing a Windows application. In the form I have a Panel and inside the panel I have a PictureBox control. I’m loading the PictureBox control with BMP image that has the following criteria: 14174 x 7874 Pixels (111.61MPixels), 1 BitsPerPixel, 3200x3200 DPI, No Compression. The memory consumption for loading this image should be 13.31 MB (13,952,776 Bytes) (this is what IrfanView takes, http://www.irfanview.com/). I’m loading...
2
2437
by: David Ricker | last post by:
I have created a PictureBox control which can have it's Image property directly bound to an image field in a database. This works perfectly for showing the images that are in the database. When I paste a new image into my control, it shows the new image and updates the image property. Problem is... It doesn't update the bound field! Any thoughts as to what I've done wrong? Any help would be greatly appreciated. The code for the...
9
14814
by: SStory | last post by:
I have a picturebox in my About form. would like to have a link to my company website. Wanted the links background to be transparent. It seems that no one knows how to do this. Have asked many times. VB help says that transparent is possible with a background image but not above a control. So how can I provide a link (URL) that is clickable, but transparent, over the picturebox in my about box?
6
4754
by: Rich | last post by:
Hello, I want to simulate the dynamic thumbnail display of Windows Explorer (winxp) on a form or pannel container. If I place a picture box on my container form/pannel and dimension it to the size of a thumbnail and set the sizemode to Stretch -- I get one thumbnail. I want to retrieve all the picture files (jpg, bmp) in a directory into an array list and then display this list as thumbnails on my form dynamically. So my question is...
4
1342
by: Justin | last post by:
I created a panel. Then I created 4 picturebox's inside that panel. I added an image to each picturebox and I can see the images in my project. However when I run my project I don't see the images. If I hardcode the image file names then it works fine. However I don't want the files to be local, I want them included in the project. Why can't I set the images at design time? Or, how do I properly load the images into my project?
0
1366
by: Jerry West | last post by:
Coming from VB6 a PictureBox was a container for other controls. This doesn't seem to be the case with .NET. In light of that can someone comment on the following.... I'm creating an app that loads a Form to maximum screen size. On the Form I have a PictureBox control that also maxs out to the screen's full resolution. I then randomly load images into the PictureBox. What I was hoping to do is have a Panel inside the PictureBox that...
0
8738
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9150
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9086
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6678
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 presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5994
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4501
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4762
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2599
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2146
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.