0

I've been trying to make a program, that makes an ellipse move on the screen (by the arrow keys), when I am still able to click the window that is open behind it (for example - Google Chrome) and the ellipse will still be visible and move-able.

I've been trying a lot of things (including TopMost) and nothing worked.

Now, my idea is to make a transparent window, that is un-clickable and will re-open (will be maximized) every time it gets minimized.

Can someone please help me? I have no code that can help, the names of the objects involved don't matter.

2 Answers2

1

I think your questions are already answered elsewhere:

  1. Click-through control in WPF (use <TextBlock IsHitTestVisible="False" .../>)

  2. Preveting the window from minimizing:

    a. Cancel minimizing event (intercept the minimize event and cancel it)

    b. Preventing from minimizing on "Show Desktop" (Win+D) command (mark the window always-on-top)

Community
  • 1
  • 1
miroxlav
  • 11,796
  • 5
  • 58
  • 99
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/11956279) – kerem Apr 09 '16 at 17:37
  • @kerem – OK, corrected. (Although in this case links are only internal ones and their Q/A's are relatively solid, i.e. they do not look to be deleted soon.) – miroxlav Apr 09 '16 at 17:54
  • None of these work, because I want the window to be click-through (like option 1), but when I try to click it makes the computer to focus on the window behind, and I want to prevent that – user6181605 Apr 10 '16 at 04:26
0

I am not sure if I understood your question right, you want to click through the ellipse.

You could for example just use two grids with different ZIndex and just Register when 1 gets clicked. Eg:

<Grid>
     <Grid Background="Transparent" Panel.ZIndex="1">

     </Grid>    
     <Grid Panel.ZIndex="0">
          <Ellipse Background="Blue" Height="100" Width="200"/>
     </Grid>
</Grid>
SanHolo
  • 48
  • 5
  • You didn't understand, I want to prevent the window from minimizing, but also make the window behind it clickable. – user6181605 Apr 10 '16 at 04:04