I have seen many similar questions to mine, and I think I might have found one that was almost the same, but none of the solutions worked that I found.
I have a C# Windows form application, with an image over an image; If the top image were rectangular, this would work fine. But the problem is, it's not, and the top image is taking up too much space with it's "control" colored background.
I can make the background of the top image completely transparent using a transparency key, and I can (obviously) make the top image disappear by just turning off visibility. I need to be able to see both, without also dimming my top image. I actually managed to get the image itself transparent, so that the background color of the control shows through (I heard that panels worked better than PictureBox's with transparency, so I've been experimenting with those, too).
Is this impossible, or am I just not understanding the answers I found, or... ?
8 3932
Lots of background... I'm having trouble finding the actual goal and problem.
You want to see one image that is laid on top of another image, without "dimming" the top image, meaning you want it to be 100% opaque.
What exactly is the problem you are running into? Could you post a photo showing the bad result and describe what you are trying to avoid?
I am confused, what exactly do you want to do here?
You have a picture of slightly smaller/non-rectanglular size over the top of another picture, and don't want the corners of that control to show up?
Setting the background of that control to transparent should have been enough?
I have an image, a large square. Over that, I have a smaller image. The smaller image is non-rectangular. The outside parts of the image shows through to the background color of the top box. Or, I can set the transparency key to the background color, and it shows through to my desktop.
A screen shot from my program. http://img10.imageshack.us/img10/928/examplen.png
edit: If you look at the example, I want the pink parts to show the card behind it.
Or, I can set the transparency key to the background color, and it shows through to my desktop.
Like all the way down to the WIndows desktop?
I would have figured if you set the transparacy for just the pointer image, but not for the card image you would have been ok.
Can you show us the code where you are doing all this?
Well.. I'm kinda noob-ish; I learn what I need when I need it.
When it shows through to the desktop, I set the Transparency Key of the form to the background color (MVS calls it "Crimson.").
The transparency part is:
this.TransparencyKey = System.Drawing.Color.Crimson;
Ok... So the two images you have... where exactly do they live?
Is one a picturebox and one the background image of the form?
Instead of setting the transparancy of the form, try setting it for just where you are showing your pointer graphic overlay.
I wasn't sure if it was appropriate to explain the details of implementation, but I'll explain.
The background is actually one of 9 images, placed in a sort-of grid as pictureboxes. This is so that I can scroll through a much larger map.
The front picture is also a picturebox, but like I said I've been experimenting with Panels.
I'm sorry, but I don't know what your advice means.
TIP: When you are writing your question, there is a button on the tool bar that wraps the [code] tags around your copy/pasted code. It helps a bunch. Its the button with a '#' on it. More on tags. They're cool. Check'em out. Sign in to post your reply or Sign up for a free account.
Similar topics
by: Fearless Freep |
last post by:
I know there's a PIL mailing list but I thought I would try the
question here as well.
I'm using PIL on Python 1.5.2 (stop laughing, it's what the ISP has
for CGI and I don't have a choice)
...
|
by: R.Marquez |
last post by:
I am trying to create a simple script that Opens an existing PNG and
resaves it with a transparent color. With the command line version of
ImageMagic this is an easy endevor (and my current...
|
by: Chris Auer |
last post by:
I have been banging my head for a couple of hours now. No matter what I
do the color that I make transparent is black. Here is the code I am
using from MSDN. I have tried bitmaps, jpegs, gifs and...
|
by: Raj |
last post by:
Hi,
Anyone has any idea as to how we can make a button or any standard windows
control as transparent or semi-trnasparent. How can we do this in C#?
Thanks,
Rajendra
|
by: Tony Clark |
last post by:
Hi,
I have a bmp that is set in a panel, i want to make the white color in the
bmp image transparent so i can see the color of the panel below. How is
this done?
thanks
tony
|
by: Dale |
last post by:
I am creating GIF images with transparent backgrounds on-the-fly for a web
app and rendering them by using
System.Drawing.Image.Save(Response.OutputStream, ImageType.GIF).
I am confident that...
|
by: Chuck Anderson |
last post by:
Is it possible to overlay a transparent watermark on an image -
dynamically?
I'd like the result to look like this example:
<http://www.cycletourist.com/temp/photo.php>
That is a bit of...
|
by: NickP |
last post by:
Hi there,
I have a usercontrol that inherits from Windows.Forms.Button.
In the OnCreateControl method I set the style of the control so that it supports transparent backcolor and set the...
|
by: abc123456 |
last post by:
Hello - I'm using imagecopyresample() to resize a GIF line-art type
image onto a polygon created with GD_Image in PHP. Each has a
transparent color (same color, I think!). The transparent color...
|
by: pek |
last post by:
Here is what I want:
I have an image, let's say a JPEG 800x600...
I want to create a transparent 128x128 PNG image and then resize the
800x600 to fit in the center of my transparent 128x128 PNG.....
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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...
|
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...
|
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...
| |