473,769 Members | 1,640 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Q: Transparent image on a form

Hi

Can anybody help me with the following? It is driving me crazy!!!

I'm trying to produce a non-rectangular form as follows:

(1) Produce a bitmap e.g. gif, using paint shop pro 5.
(2) The Background color of the bitmap is set to white.
(3) Draw a design on the bitmap in a color other than white.
(4) Create a windows application.
(5) Set the forms background image to be the bitmap created earlier.
(6) Set the transparencyKey of the form to be white i.e. the same as the
background color of the bitmap.
(7) Set the FormBorderStyle to None
(8) Run the application.

I expected just the non-white images but instead I still see the white
background! D'OH!!!

Can anybody tell me what I'm doing wrong?

Here's a link to Microsoft describing the same thing.

Thanks in adavance

Geoff
Nov 21 '05
40 2014
>>>> You got from me very early a sample, that combined with the sample on
MSDN
and that combined with the code Peter was providing you is in my
opinion more than you got now at least from Herfried.

Your sample doesn't show how to create an arbitrary shaped form from a
bitmap/mask.


Did I say that?


Well, that's what the OP was obviously looking for.

Because it is posible to make a region direct as any shape, there is no need
to use a bitmap as an intermidiate. However because there could be a slight
reason, it was needed to ask from the OP how and why he was using that
bitmap. But you did not. I would have done.

This is the same as when people ask you on Internet where is Salzburg and
than tell them (from your position) to go to the west, without asking what
is there starting point.

Cor
Nov 21 '05 #41

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

Similar topics

0
1847
by: Graphics_master | last post by:
Anyone know how to create a transparent splash screen similar to Photoshop, After Effects, or premiere. They have a wonderful transparent look. I realize that I can use the key color property of a form to make colors transparent, but I'm not satisfied with aliased edges. I want full 256 color alpha support. I see that the png format has nice transparent support but the form shows through. Forms don't support a transparent background...
2
33528
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");
2
8312
by: Jaikumar | last post by:
Hi, 1) I have created one windows application, In the main form ( form1) i have added one usercontrol (usercontrol1), In that user control i am drawing one image. 2) In the UserControl1 i am showing one transparent form (form3) when ever user preseed left mouse button. 3) The form3 has one transparent user control (usercontrol2) that paints circles. That measn the circles will show on top the usercontrol1 image. 4) The form3 border style...
9
7819
by: don | last post by:
I want to create a transparent form and can write something on it by using Ink. I try to set form.backcolor = color.transparent, but it dosen't accept. And everything will be transprent when i use Opacity. Finally, i try to use transparencykey, but any mouse actions will be transferred to the windows below the transparent area. Any solutions? thx
1
13142
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 new bitmaps created in code, but I cant get any image to go transparent. Thanks if you can help. // Create a Bitmap object from an image file. Bitmap myBitmap = new Bitmap(System.Web.HttpContext.Current.Server.MapPath("resources/img/")
8
10610
by: Grahammer | last post by:
Is it possible to set the background of a usercontrol as transparent? I tried setting the background image of the usercontrol to a transparent GIF, but that caused MAJOR problems. I'm making some controls that aren't rectangular and it won't be pretty if I end up with a grey rectangle behind each one. http://msdn.microsoft.com/library/en-us/vbcon/html/vbtskGivingYourControlTransparentBackground.asp?frame=true
5
2545
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
1
1597
by: Lucile | last post by:
Hi All, I am trying to obtain some sort of a "Model" based on horizontal & vertical lines (like a frame) drawn on a form or on a PictureBox. For frames configuration purposes, I created a white background image; and that works fine. But the "Model" will be used to cut off pieces of a given image with MS Office. I would therefore like that the lines be appearent on the image to be cut; but the the underlying control be transparent (so as...
8
2150
by: MikeB | last post by:
Hi, I created a picturebox with a map as an image. I want to make certain areas on the map clickable hotspots and the way I'm trying to do this is to create a transparent label with a different cursor (hand) and then I code the click_event for that label. However, I cannot make the label transparent, even if I choose the Transparent option for the attribute for the background color of the label. Any ideas or suggestions? Thanks
4
10248
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 the transparency is working properly because if I save the created image to the local hard disk and then view it in a web page or an image editor, the transparency is correct. I can also view the transparency on-the-fly in a Windows.Forms...
0
9589
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10211
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
9994
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
9863
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...
0
8870
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7408
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
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
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
3
2815
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.