I made a full screen transparent window
Lable is full screen printed text
Lable also can penetrate
But the mouse moved to the text will not be able to penetrate the
How can you make the mouse on the text when also can penetrate
Requirements: some words printed on the full screen, do the mouse full-screen through
Please the great god glad!
CodePudding user response:
If penetrated in the text, the text also can see?
You can capture the mouse position on the text, converted to screen coordinates, complete follow-up actions
CodePudding user response:
reference 1st floor xuzuning response: if penetrated in the text, the text also can see? You can capture the mouse position on the text, converted to screen coordinates, to complete the follow-up action Thanks to answer! Need to see the text, I actually do is full screen watermark But text will now get the mouse focus, text does not get focus clearance How to realize the text also can penetrate, other controls can also be used CodePudding user response:
Do you have any good method? CodePudding user response:
Form only part of the background color can be penetrated (this is the function of the system can't change) so text cannot be through Since full screen is the watermark, then change the train of thought: change desktop background imageUser32. The SystemParametersInfo function in the DLL CodePudding user response:
There are some desktop lyrics that penetration is how to do? CodePudding user response:
Can you click on the words at the back of the icon? For example, take a look at CodePudding user response:
But the mouse moved to the text will not be able to penetrate the - "posted on the rendering or related code CodePudding user response:
The mouse on the watermark section, in the text the mouse cursor is The mouse on the watermark, the mouse into a pointer, and this is the mouse focus is on the text of the watermark The code is simple: Windows: Background="{x: Null}" AllowsTransparency="True" Topmost="True" ShowInTaskbar="False" The grid, label: & lt; The Grid x: Name="frontscreen" Background="Transparent" ScrollViewer. VerticalScrollBarVisibility="Disabled" IsHitTestVisible="False" Focusable="False" & gt; CodePudding user response: Tried a lot of method, can solve The great spirit quick apparition CodePudding user response:
The reference 7 floor duanzi_peng response: but when the mouse moves to the text will not be able to penetrate the - "posted on the rendering or related code Upstairs is map, see me clear? CodePudding user response:
IsHitTestVisible attribute is set to false CodePudding user response:
Sorry, a wrong answer,,, Public MainWindows () { InitializeComponent (); SourceInitialized +=delegate { IntPtr HWND=new WindowInteropHelper (this). The Handle; Uint extendedStyle=GetWindowLong (HWND GwlExstyle); The SetWindowLong (HWND GwlExstyle, extendedStyle | WsExTransparent); }; } Private const int WsExTransparent=0 x20; Private const int GwlExstyle=(20); [DllImport (" user32, "EntryPoint=" SetWindowLong ")] Private static extern uint SetWindowLong (IntPtr HWND, int nIndex, uint dwNewLong); [DllImport (" user32, "EntryPoint=" GetWindowLong ")] Private static extern uint GetWindowLong (IntPtr HWND, int nIndex); Add these lines is OK, oh, and Using System. The Runtime. InteropServices; Using System. Windows. Interop.