1

I`m need to draw a rectangle over all windows. For this, I am using a topmost and fullscreen form, and System.Drawing.Graphics. The problem is that the rectangle is created via DrawRectangle does not cover the taskbar. at the screenshot right rectangle is drawn as follows:

g.DrawRectangle (MyPen, 300, 300, 800, 1000);
g.FillRectangle (brGradient, 300, 300, 800, 1000);

but apparently, it does not cover the taskbar, although it is covered by the form (the cursor on the panel is the same as in the whole form, rather than the standard arrow). In what may be the problem?

enter image description here

LarsTech
  • 80,625
  • 14
  • 153
  • 225
kopaty4
  • 2,236
  • 4
  • 26
  • 39
  • 2
    possible duplicate of http://stackoverflow.com/questions/505167/how-do-i-make-a-winforms-app-go-full-screen – Jim H. Nov 21 '11 at 15:20
  • I saw this question, but it doesnt works for me. – kopaty4 Nov 21 '11 at 15:34
  • It does for me. What OS are you using? Have you tried starting a new app and testing the sample? I used the exact code from the link above and changed the BackColor to black with an opacity of 50% and it looked just like what I'd expect. – Jim H. Nov 21 '11 at 15:57
  • Windows 7 x32. In my program the taskbar is 50% transparent too. Problem is with rectangle. – kopaty4 Nov 21 '11 at 17:06

0 Answers0