473,609 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Transparent form which records clicks and passes on to applicationbelo w

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 1975
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
6485
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 IE or Firefox. I have tried GIF and PNG with 'binary' transparency and PNG24 with 'alpha' transparency (obviously the latter won't work in IE without the AlphaImageLoader trick). Here is a test page for you to see it not working in action:
3
6821
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 frmTrialInfo. Each Trial can have three Classes. The third form is frmClassInfo. These forms are used for update and adding new records. The user displays an event for update (frmEventAdd). Then clicks on a button to display the Trials for that event...
2
2678
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 window does not need force it just needs to be ontop of all the other windows. another example is .. if you press alt-ctrl-del to bring up task manager how can i program the window to pass mouse clicks on it to the window behined it, if task manger...
6
5046
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 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...
1
2907
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 mouse clicks shall go through to the under lying window. 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...
8
2137
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 cursor (hand) and then I code the click_event for that label. However, I cannot make the label transparent, even if I choose the Transparent option for the attribute for the background color of the label. Any ideas or suggestions? Thanks
2
5451
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 the form transparency key to the form backcolor), but i dont want the mouse clicks to pass through my form and on to the windows behind. Can i perhaps do this with a message filter? by deregistering the filter that must already be there to...
4
5099
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 InitializeComponent() in the constructor of the form. This works great on my computer Windows XP Pro; however on some other computer the TransparenecyKey isn't working and you see the horrible green color that shouldn't be there. This doesn't happen on all machines...
8
10158
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 used PhotoShop to make the image background transparent .. again no affect. If I make the image a...
0
8127
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8067
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8567
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8215
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8398
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6053
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4015
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2529
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

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.