473,785 Members | 3,067 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Should I use the PictureBox Image or BackgroundImage

For various reasons I want to use a PictureBox to display images.
That is I want sometimes to assign an Image to the PictureBox
Sometimes I want to draw on that Image.

What are the reasons for and against using the PictureBox Image property,
and what are they for using the
BackgroundImage .

Looking for help in deciding which to use.

Thanks
Feb 5 '07 #1
2 3275
Hi,

" Frank" <fr***@a-znet.comwrote in message
news:Oy******** ******@TK2MSFTN GP06.phx.gbl...
| For various reasons I want to use a PictureBox to display images.
| That is I want sometimes to assign an Image to the PictureBox
| Sometimes I want to draw on that Image.
|
| What are the reasons for and against using the PictureBox Image property,
| and what are they for using the
| BackgroundImage .

Background is that, a background image for a control which has other
features, it won't be nice (or smart) to use let's say a Textbox just for
its background image instead of his main feature.

With such little details as you provided in your post I would suggest u to
go with the PictureBox

--
Ignacio Machin
machin AT laceupsolutions com
Feb 5 '07 #2
Thanks, I am going with the PictureBox but wonder if I should use the Image
or BackgroundImage to draw on.
"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions .comwrote in
message news:uA******** ******@TK2MSFTN GP06.phx.gbl...
Hi,

" Frank" <fr***@a-znet.comwrote in message
news:Oy******** ******@TK2MSFTN GP06.phx.gbl...
| For various reasons I want to use a PictureBox to display images.
| That is I want sometimes to assign an Image to the PictureBox
| Sometimes I want to draw on that Image.
|
| What are the reasons for and against using the PictureBox Image
property,
| and what are they for using the
| BackgroundImage .

Background is that, a background image for a control which has other
features, it won't be nice (or smart) to use let's say a Textbox just for
its background image instead of his main feature.

With such little details as you provided in your post I would suggest u to
go with the PictureBox

--
Ignacio Machin
machin AT laceupsolutions com


Feb 5 '07 #3

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

Similar topics

2
33532
by: Alex Gray | last post by:
Hi, I'm trying to make my PictureBox transparent to the BackgroundImage of the Form, not the BackColor of the form. Here's what i have: --------------------------------------------------- this.BackColor = Color.Wheat; this.gameBackgroundBMP = new Bitmap(GetType(),"MyForm.backGround.bmp");
1
2302
by: active | last post by:
I have a UserControl that contains two pictureboxes. One on top of the other. The top one is smaller then the bottom one. The top one is to be transparent. I want to draw on it and then sometimes clear it and sometimes copy the drawing to the bottom picturebox image or BackgroundImage. Just to see if it would work I set the Background color of the top one to transparent but, rather then seeing the bottom box in the transparent one I...
2
6284
by: Wade | last post by:
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...
1
8791
by: Ricardo Furtado | last post by:
in my app i must have several pictureboxes over the others. Some pictureboxes just have a couple of lines or rectangles, and absolutly nothing more but the image is an .BMP. So, my problem is that i need to see whats beind those pictureboxes and at the same time showing, the lines and rectangles that exist on the pictureboxes that are at the top. Because i just can't copy the image to the other picturebox (because i'll have to be able to...
4
6267
by: munglet | last post by:
Is there anyway to get a picturebox to recieve focus? I ask because I implemented a "delete" button in a picturebox (due to size constraints), but now due to accessibility reasons I need to be able to tab to the picturebox via the keyboard. Since the picturebox doesn't recieve focus the user can't get to the picturebox control. Am I missing something? This is using .NET 1.1
1
10251
by: Joe Spears | last post by:
Hi Is there a simple way to bind a PictureBox image to a datatable?? I've tried pictureBox.DataBindings.Add("BackgroundImage", dt1, "Picture"); But it doesn't seem to work. Do I have to go to the trouble of creating memorystreams?? I thought there was an easy way in VS 2005 / .Net 2.0
6
7238
by: Rob | last post by:
Hello, I'm sure this has come up before. I have need for a collection of all elements/objects in an HTML document that have any kind of an attribute (HTML or CSS) that is making use of a URL to display an image. document.images only seems to reference image tags. The collection needs to include background images, input type = image, image maps, css assigned background, etc. Honestly, I am probably not aware of all the possibilities...
0
1367
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...
3
5376
by: kirk | last post by:
I have a form with a PictureBox control on it. The .Image property is set to a PNG file(which shows the picture of the US map) with some transparency in it. The .BackColor property is set to Transparent. This so far, works perfect. I now, would like to put another PNG image(an arrow showing positioning on the map) over the last PictureBox. The problem i'm having, the background for this second PictureBox only stays transparent when...
0
10325
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10091
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
9950
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
7499
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
6740
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
5381
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3646
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.