how to clear screen when i draw to screen?
-
how to clear this graphic? if i draw graphic to screen example: public static void DrawToScreen(int pointX, int pointY) { IntPtr deskDC = UnmanagedMethods.GetDC(IntPtr.Zero); Graphics g = Graphics.FromHdc(deskDC); GraphicsContainer cont = g.BeginContainer(); g.SmoothingMode = SmoothingMode.AntiAlias; g.SmoothingMode = SmoothingMode.HighQuality; g.FillRectangle(new SolidBrush(Color.FromArgb(255, Color.Blue)), pointX, pointY, 2, 2); g.EndContainer(cont); g.Dispose(); UnmanagedMethods.ReleaseDC(deskDC); } this fucntion fill rectangle to screen. if i need to clear screen(clear desktop), how i do? please give some tips or hints for me thanks a lot....
-
how to clear this graphic? if i draw graphic to screen example: public static void DrawToScreen(int pointX, int pointY) { IntPtr deskDC = UnmanagedMethods.GetDC(IntPtr.Zero); Graphics g = Graphics.FromHdc(deskDC); GraphicsContainer cont = g.BeginContainer(); g.SmoothingMode = SmoothingMode.AntiAlias; g.SmoothingMode = SmoothingMode.HighQuality; g.FillRectangle(new SolidBrush(Color.FromArgb(255, Color.Blue)), pointX, pointY, 2, 2); g.EndContainer(cont); g.Dispose(); UnmanagedMethods.ReleaseDC(deskDC); } this fucntion fill rectangle to screen. if i need to clear screen(clear desktop), how i do? please give some tips or hints for me thanks a lot....
Why do you need to paint to the Desktop? Have you considered using a full-screen application instead?
My Blog: This Blog
-
Why do you need to paint to the Desktop? Have you considered using a full-screen application instead?
My Blog: This Blog
Maybe it is a hoax. :-D
Tan Li I Love KongFu~
-
Why do you need to paint to the Desktop? Have you considered using a full-screen application instead?
My Blog: This Blog
i can't using fullscreen because i need to draw to screen when i drag mouse now i can draw when drag but can't clear that screen if draw on form, can use invalidate() if not on form, how can i do? please give some hints or tips to me thanks a lot....
-
i can't using fullscreen because i need to draw to screen when i drag mouse now i can draw when drag but can't clear that screen if draw on form, can use invalidate() if not on form, how can i do? please give some hints or tips to me thanks a lot....
I'm really guessing now, but have you tried using Invalidate? It may force Windows to redraw the desktop (it is, after all, just a different kind of window). If not, I'm afraid I'm stumped, sorry.
My Blog: This Blog
-
I'm really guessing now, but have you tried using Invalidate? It may force Windows to redraw the desktop (it is, after all, just a different kind of window). If not, I'm afraid I'm stumped, sorry.
My Blog: This Blog
how to use invalidate? please advice me... i read invalidaterect from dllimport user32.dll but don't understand if have another function or other as same as invalidate. please advice me. thanks a lot...