473,486 Members | 1,640 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Transparent form which records clicks and passes on to applicationbelow

I want to create a fully-transparent fullscreen form which records
clicks but also passes on the 'click' to the desktop. Specifically, I
have an existing application which displays a webpage fullscreen. I
want my new application to run transparently over the top of the
existing app, and when the user clicks the mouse button, my
transparent application records the location of the click while
'passing on' the click to the application below it, allowing the user
to click on the webpage.

What is the best way to achieve this in .NET?

To achieve transparency, I have tried setting the form's opacity to 0,
or the background color to the same color as the transparency key, but
this means my form does not receive mouse clicks at all.

Alternatively, I can set opacity to 1%, which means the form is almost
transparent but recieves clicks. Now, how do I pass on clicks to the
application below? I could use PInvoke to simulate a click with
mouse_event, but this presumably clicks on the topmost application
(i.e. my transparent app) while I need to click on an application
beneath the topmost.

Is there some standard technique for this?
Aug 8 '08 #1
1 1960
On Aug 8, 8:51 am, matthewr <mrank...@gmail.comwrote:
I want to create a fully-transparent fullscreen form which records
clicks but also passes on the 'click' to the desktop. Specifically, I
have an existing application which displays a webpage fullscreen. I
want my new application to run transparently over the top of the
existing app, and when the user clicks the mouse button, my
transparent application records the location of the click while
'passing on' the click to the application below it, allowing the user
to click on the webpage.

What is the best way to achieve this in .NET?

To achieve transparency, I have tried setting the form's opacity to 0,
or the background color to the same color as the transparency key, but
this means my form does not receive mouse clicks at all.

Alternatively, I can set opacity to 1%, which means the form is almost
transparent but recieves clicks. Now, how do I pass on clicks to the
application below? I could use PInvoke to simulate a click with
mouse_event, but this presumably clicks on the topmost application
(i.e. my transparent app) while I need to click on an application
beneath the topmost.

Is there some standard technique for this?
I think you'd do better to create a mouse hook rather than a
transparent form.

Here is one article on CodeProject.com, but there are others:

http://www.codeproject.com/KB/dotnet...yboardlib.aspx

Chris
Aug 8 '08 #2

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

Similar topics

8
6468
by: djmanmaster | last post by:
Am I right in thinking that images with transparent areas (GIFs or PNGs) should allow clicks to "pass through" to any underlying elements behind them? I have had no luck getting this to work in...
3
6803
by: Susan Bricker | last post by:
Greetings. I have three forms that are open at the same time. They are related and cascading. The first form (frmEventAdd) is the anchor. Each event can have many Trials. The second form is...
2
2671
by: joe | last post by:
I have a 50% transparent window that is on top of the desktop. I want the user to be able to click 'Through the transparent window' onto objects behind it ... my computer. The transparent...
6
5039
by: Per Larsson | last post by:
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...
1
2900
by: Per Larsson | last post by:
Hi all! I am working with a project and want to make a form that is semi transparent, and transparent to mouse clicks. (Se through and click through.) The form shall be visible but opaque and the...
8
2124
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...
2
5420
by: pigeonrandle | last post by:
Hi, I am trying (with little (no) success) to create a transparent form that can capture mouse events. Put another way, i would like to show the other windows that are behind my form (like setting...
4
5088
by: Eric Renken | last post by:
Well I seem to have an interesting problem. I have an application that where I am setting the BackgroundImage and the TransparencyKey set in code. These are both set after the...
8
10141
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...
0
6964
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
7173
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...
1
6839
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
5427
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,...
1
4863
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...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1378
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 ...
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.