How do I get the desktop to refresh?
I've drawn some graphics on the screen by doing:
Later, I want to remove them. I've tried different ways, like:
and:
and Clearing or Restoring the Graphics, all without success.
This feels like something that should be really simple!
Any help would be really appreciated?!
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the Internet, we know this is not true." -- Robert Wilensky
I've drawn some graphics on the screen by doing:
Code:
Using gr As Graphics = Graphics.FromHwnd(GetDesktopWindow())
gr.DrawString("text", New Font("Arial", 20), Brushes.Green, New Point(50, 100))
gr.DrawImage(New Bitmap("c:\logo.bmp"), New Point(800, 100))
End Using
Later, I want to remove them. I've tried different ways, like:
Code:
SendMessage(GetDesktopWindow, WM_PAINT, 0, 0)
and:
Code:
Invalidate(Screen.PrimaryScreen.WorkingArea, True)
and Clearing or Restoring the Graphics, all without success.
This feels like something that should be really simple!
Any help would be really appreciated?!
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the Internet, we know this is not true." -- Robert Wilensky