473,545 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

transparent panel

Hi,

I have a picturebox with a bitmap inside. I need to add a panel to the
picturebox, but I have to see behind. Meaning, the panel has to be
transparent but not invisible. This panel will hold other images that I
will or wont display through code.

I'm saying panel, but it really doesn't matter. It could be any container
control that has height/width and location properties.

Any ideas would be greatly appreciated.

regards,

Marco
Nov 15 '05 #1
1 14449
Found a way. By overriding the onPaintBackgrou nd method:

private class TransparentPane l : Panel

{

public TransparentPane l()

{

}

//This method makes sure that the background is what is directly behind the
control

//and not what is behind the form...

override protected CreateParams CreateParams

{

get

{

CreateParams cp = base.CreatePara ms;

cp.ExStyle |= 0x20;

return cp;

}

}

override protected void OnPaintBackgrou nd(PaintEventAr gs e)

{

// do nothing

}

}

"Marco Martin" <ma**********@s ympatico.ca> wrote in message
news:mV******** ************@ne ws20.bellglobal .com...
Hi,

I have a picturebox with a bitmap inside. I need to add a panel to the
picturebox, but I have to see behind. Meaning, the panel has to be
transparent but not invisible. This panel will hold other images that I
will or wont display through code.

I'm saying panel, but it really doesn't matter. It could be any container
control that has height/width and location properties.

Any ideas would be greatly appreciated.

regards,

Marco

Nov 15 '05 #2

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

Similar topics

0
953
by: Max | last post by:
Hello Everyone, I have written a VB.NET application that uses a transparent panel. I display various forms and one external COM application in my transparent panel (one at a time). When I resize my panel or change its location, then theform or application that fills the transparent panel resizes or moves as needed. However, I have a...
4
1717
by: UJ | last post by:
I've got multiple controls on a win forms page - and I have a panel that I want the user to be able to click on to have something happen which I have put on top of some of the control. I make the panel transparent but it doesn't show what's behind it, it shows the form background. Is there anyway to have something transparent so it shows...
1
5228
by: choffi | last post by:
Hi, I have a problem which, having looked through various previous postings, I notice that others have also come across. The problem I have as follows: I have incorporated an external Active-X control into my VB.NET project. The control itself works very well (it parses and displays AutoCAD DXF files). The problem is that I need my users...
5
2530
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
0
1309
by: anishkphilip | last post by:
Hi, I've a Panel on a Windows form. I've set the TransparencyKey property of the Form as the BackColor of the panel so that the portion of the Form occupied by the panel will be transparent. I want to get the mouse events on this panel. But when the Panel is transparent, all the mouse events are going to the window below the application. ...
0
1451
by: SippanJ | last post by:
Hi. I'm implementing a GIS application using C#. I wish to draw lines and dots on a map so to achieve this I use a browser to show the map images and places a transparent panel on top of the browser. The Panel is inherited from the Control Panel and overrides these methods: protected override void OnPaint(PaintEventArgs e) {
8
10150
by: Brian Ward | last post by:
I am looking for a simple way to set the image transparency in a PictureBox. I have a moving PictureBox containing a graphic image .. moving by incrementing its Left property. The background however shows white as the PictureBox moves but I want it to be transparent. The PictureBox BackColor is set to Transparent .. but no affect. I have...
0
2853
by: MasterOfTheDark | last post by:
This one's a hairy one to explain. What I've got is a class called "VistaGroupBox" that I put some nice-looking Vista-style gradients in the background and made to look like the ribbon categories you see in Office 2007. I got it working great, and created a few more controls, including a "VistaButton", which is primarily transparent when the...
0
7475
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
7409
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
7918
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
7436
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
7766
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...
1
5341
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...
0
3463
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...
1
1897
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
0
715
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...

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.