Hi. All
I am newbie and I am trying to draw something to screen directly.
I made following code.
I could draw a line on screen but when I open some window or popup and so on, the drawing is cleared as window size.
Is there any way to protect screen drawing from other window ?
I am newbie and I am trying to draw something to screen directly.
I made following code.
VB.NET:
Dim hScreenDC As IntPtr = GetWindowDC(IntPtr.Zero)
Dim dPen As New Pen(Color.Red, 5)
GR = Graphics.FromHdc(hScreenDC)
Using GR
GR.DrawLine(dPen, 100, 100, 500, 500)
End Using
ReleaseDC(IntPtr.Zero, hScreenDC)
I could draw a line on screen but when I open some window or popup and so on, the drawing is cleared as window size.
Is there any way to protect screen drawing from other window ?