By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,654 Members | 1,575 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,654 IT Pros & Developers. It's quick & easy.

Truely transparent form

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
"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

P: n/a
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

P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.