See if this helps. (code originated from here)
Public Class Form1
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Integer) As Integer
Private Declare Function InvalidateRect Lib "user32" (ByVal hwnd As IntPtr, ByVal lpRect As IntPtr, ByVal bErase As Boolean) As Boolean
Private WithEvents myTimer As New Timer With {.Interval = 100, .Enabled = True}
Private Sub drawOnDesktop()
Dim HDC As Integer = GetDC(0)
Dim myGraphics As Graphics = Graphics.FromHdc(HDC)
Dim myPen As New Pen(Color.Chartreuse, 30) '// set pen color and width.
myGraphics.DrawLine(myPen, 150, 255, 650, 255) '// (preset pen, startLocation.X, startLocation.Y, endLocation.X, endLocation.Y)
myGraphics.DrawLine(myPen, 150, 355, 650, 355) '// (preset pen, startLocation.X, startLocation.Y, endLocation.X, endLocation.Y)
myGraphics.Dispose()
End Sub
Private Sub myTimer_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles myTimer.Tick
Me.drawOnDesktop()
End Sub
Private Sub clearDesktopDrawing()
InvalidateRect(IntPtr.Zero, IntPtr.Zero, False)
End Sub
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Me.clearDesktopDrawing()
End Sub
End Class