473,387 Members | 1,561 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Can I draw overlapped PNG files with transparent background inimageboxcontrol?

Dear all,

I'm trying to draw many overlapped PNG files with transparent background
in imagebox control.
But the transparent background in this control is rendered as the main
control's background color.
So the image formerly drawn is covered by the latter image with unwanted
background color.
I wonder if I can get really transparent background color.

Appreciate any help.
Thanks in advance.
Jun 10 '07 #1
2 6555
Niu,

You could probably draw all the PNG images to a new image, and the
transparency will be maintained, and then show that in the picturebox.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Niu Kun" <ha*******@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Dear all,

I'm trying to draw many overlapped PNG files with transparent background
in imagebox control.
But the transparent background in this control is rendered as the main
control's background color.
So the image formerly drawn is covered by the latter image with unwanted
background color.
I wonder if I can get really transparent background color.

Appreciate any help.
Thanks in advance.
Jun 10 '07 #2
Nicholas Paldino [.NET/C# MVP] 写道:
Niu,

You could probably draw all the PNG images to a new image, and the
transparency will be maintained, and then show that in the picturebox.

Dear Mr. Paldino,

Thank you for your reply.
But this may result in some other problem.
Do you mean that I can create Image object with some other Image object
at various location?
And I'll have draw the image dynamically as the user click on the panel.
I'll have to create the image each time the Image is click on, and this
seems to be difficult.
Will Directx be helpful?

Thanks again for your kind suggestion.
Jun 11 '07 #3

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

Similar topics

5
by: Paul Schnitter | last post by:
Update: My custom control is based on the article "Creating Visual Basic .NET controls from scratch" in "Adventures in .NET" on MSDN. It is designed to be a replacement for the VB6 shape...
21
by: DraguVaso | last post by:
Hi, I have an inherited DataGrid, that does lots of extra stuff. For exemple drawing a backgroundimage in every cell. The problem is that it's taking too much time (using gdi+), so I want to do...
1
by: Efkas | last post by:
My application have some level : 1. MyButton class with Label inheritance 2. MyComponent as User Control loading and positionning some of MyButtons 3. MyApp loading and positionning MyComponent ...
1
by: Robert W. | last post by:
I've successfully implemented code to change a form's background to a nice blue gradient. It looks great! But I'm having problems adding controls with transparent backgrounds to the form. ...
1
by: Carsten Klotz | last post by:
Hi, I've set the TransparencyKey of a form to black. That means, all black pixel will be shown transparent within the drawing content of that form. If I set the background to black, I can see...
3
by: Ian Jagger | last post by:
Hi, I am trying to convert a group of wmf files to gif files. Easy you'd think? I'm using the following code: Image img = Image.FromFile (this.tbxFilename.Text); string filename =...
0
by: pope | last post by:
I am up for shade icon when I click the icon which I draw on a SDI viw with CImageList::Draw(pDC,index,myPoint, ILD_BLEND50). the icons are edited in the vc++ icon editor, with the 'transparent'...
0
by: Niu Kun | last post by:
Dear all, I'm planning to draw some overlapped pictures on a tabpage. I use PictureBox control. And the picture seems well at first. But when I try to draw a PictureBox on the other. The...
10
by: Phil | last post by:
I would like to draw some text which will be in front of any other controls, but without obscuring them completely. If I use DrawString in the form's Paint handler the text is always behind, not in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...

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.