How to create a Transparent Window

S

Sebastien Girard

Hello,

I am using the IE WebBrowser (shdocvw.dll) inside my form and use it to
display an HTML background in my form. I also want to capture mouse events
that occur on the browser (Mouse Down). To do so, my class implements
IMessageFilter to pre filter messages and do special stuff on Mouse Down
events on the browser. My problem lies in the fact that I can't get the
Handle of the browser, therefore I can't tell whether the mouse events
occurred in the browser window or anywhere else...

Since I can't find any answer on how to get the Handle of the WebBrowser
Control I was thinking of creating a dummy/invisible window over the browser
that would capture mouse events but would not hide the Browser...

If you have any idea on getting the Handle of the WebBrowser Control or on
How to create a transparent Window over my Browser, please let me know.

Thanks
 
B

Bob Powell [MVP]

As soon as a window becomes transparent it stops getting the mouse input so
that won't work either.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
S

Sebastien Girard

OK thanks for the head's up, I won't go in that direction...

Do you have any suggestion has to how I can solve my problem?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top