473,549 Members | 2,906 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 3246
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
33505
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
2292
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...
2
6259
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...
1
8704
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...
4
6249
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...
1
10210
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
7222
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,...
0
1361
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...
3
5353
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...
0
7560
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7487
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...
0
7758
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. ...
0
7998
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7517
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...
0
7844
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...
0
6098
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3514
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1978
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

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.