Private Declare Function SetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Sub Timer1_Timer()
Dim Hdc1 As Long
Hdc1 = GetDC(0)
Dim i As Long
For i = -5 To 5
Me.Caption = SetPixel(Hdc1, Screen.Width / Screen.TwipsPerPixelX / 2 + i, Screen.Height / Screen.TwipsPerPixelY / 2, RGB(255, 0, 0))
Me.Caption = SetPixel(Hdc1, Screen.Width / Screen.TwipsPerPixelX / 2, Screen.Height / Screen.TwipsPerPixelY / 2 + i, RGB(255, 0, 0))
Next i
End Sub