473,396 Members | 2,024 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,396 software developers and data experts.

Truely transparent form

Hi all!
I am working with a project and want to make a form that is truely
transparent.
(Se through and click through.)
I can make it transparent by setting the Opaqe property, and by
setting the TransparencyKey colour I can make it click through in
parts that then becomes invisible.
But I want the hole form to be "click through". All controls, frames,
bars and everything!
It seems that there is no support for that in VB.net, but I have seen
VB6 code
that can do it by using Windows API´s.
Does any one know how to do that inb VB.net?
Nov 21 '05 #1
6 5038
"Per Larsson" <pe*********@samhall.se> schrieb:
I am working with a project and want to make a form that is truely
transparent.
(Se through and click through.)
I can make it transparent by setting the Opaqe property, and by
setting the TransparencyKey colour I can make it click through in
parts that then becomes invisible.
But I want the hole form to be "click through". All controls, frames,
bars and everything!
It seems that there is no support for that in VB.net, but I have seen
VB6 code


Create a 'GraphicsPath' of appropriate shape, then create a 'Region' from it
(see 'Region' constructor) and assign it to the form's 'Region' property at
runtime.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #2
Per,

You mean like this one?

http://groups.google.com/groups?selm...TNGP14.phx.gbl

Cor

"Per Larsson" <pe*********@samhall.se>
Hi all!
I am working with a project and want to make a form that is truely
transparent.
(Se through and click through.)
I can make it transparent by setting the Opaqe property, and by
setting the TransparencyKey colour I can make it click through in
parts that then becomes invisible.
But I want the hole form to be "click through". All controls, frames,
bars and everything!
It seems that there is no support for that in VB.net, but I have seen
VB6 code
that can do it by using Windows API´s.
Does any one know how to do that inb VB.net?

Nov 21 '05 #3
Thank you for answering!
Got the Region OK, but how do I make it transparent to mouse clicks?
Used this code:

Dim p As New System.Drawing.Drawing2D.GraphicsPath()
p.AddRectangle(New Rectangle(0, 0, 600, 400))
Me.Region = New Region(p)

Did I get something wrong?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 21 '05 #4
"Per Larsson" <pe*********@samhall.se> schrieb:
Got the Region OK, but how do I make it transparent to
mouse clicks? Used this code:

Dim p As New System.Drawing.Drawing2D.GraphicsPath()
p.AddRectangle(New Rectangle(0, 0, 600, 400))
Me.Region = New Region(p)

Did I get something wrong?


Your code should work. Everything outside the region will be completely
transparent, and clicks will be forwarded to the underlying window, not your
window.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #5
OK!
It doesn´t solv my problem then.
I want the form to be visible but transparent (opaqe) and the mouse
clicks to go through the form to the underlying window.
/Per

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message news:<O$**************@tk2msftngp13.phx.gbl>...
"Per Larsson" <pe*********@samhall.se> schrieb:
Got the Region OK, but how do I make it transparent to
mouse clicks? Used this code:

Dim p As New System.Drawing.Drawing2D.GraphicsPath()
p.AddRectangle(New Rectangle(0, 0, 600, 400))
Me.Region = New Region(p)

Did I get something wrong?


Your code should work. Everything outside the region will be completely
transparent, and clicks will be forwarded to the underlying window, not your
window.

Nov 21 '05 #6
That was cool, but not what I am after.
I want the form to be visible but transparent (opaqe) and the mouse
clicks to go through the form to the underlying window.
/Per
"Cor Ligthert" <no************@planet.nl> wrote in message news:<#m**************@TK2MSFTNGP11.phx.gbl>...
Per,

You mean like this one?

http://groups.google.com/groups?selm...TNGP14.phx.gbl

Cor

"Per Larsson" <pe*********@samhall.se>
Hi all!
I am working with a project and want to make a form that is truely
transparent.
(Se through and click through.)
I can make it transparent by setting the Opaqe property, and by
setting the TransparencyKey colour I can make it click through in
parts that then becomes invisible.
But I want the hole form to be "click through". All controls, frames,
bars and everything!
It seems that there is no support for that in VB.net, but I have seen
VB6 code
that can do it by using Windows API´s.
Does any one know how to do that inb VB.net?

Nov 21 '05 #7

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

Similar topics

0
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...
9
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...
3
by: Steve Koon | last post by:
Any thoughts on getting this project to work or suggesting another method would be appreciated. Steve ========================================== Project: A Windows Form which acts as a...
8
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...
0
by: Henry Wu | last post by:
Hi, I am aware that TransparencyKey only works with top-level forms or Non-MDI Child Forms, if one tries to set the opacity or transparencykey property to a MDI-Child form, it will have no effect....
4
by: jcrouse | last post by:
I am using the following code to move a label on a form at runtime: If myMousedown = lblP1JoyRight.Name Then If lblP1JoyRight.BackColor.Equals(Color.Transparent) Then bTransCk = True ...
2
by: Dean Slindee | last post by:
It appears that I have two routines that don't play well together! First routine: a form's background is shaded with a gradient color. Second routine: then, the background of all labels on the...
4
by: ray well | last post by:
in my app i need to make a RichTextbox control transparent. i need it to be a like a pane of glass lying on a sheet of paper, where u can see everything on the sheet of paper not covered by text...
8
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...
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
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...
0
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,...
0
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...
0
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...
0
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...
0
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,...
0
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...

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.