Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Option Strict Off
- Option Explicit On
- Imports VB = Microsoft.VisualBasic
- Imports System.Runtime.InteropServices
- Friend Class Form1
- Inherits System.Windows.Forms.Form
- Private Declare Function GetDC Lib "user32" Alias "GetDC" (ByVal hwnd As Integer) As Integer
- Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As Integer, ByVal x As Integer, ByVal y As Integer) As Integer
- Private Sub Form1_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
- Timer1.Interval = 100
- Timer1.Enabled = True
- End Sub
- Private Sub Timer1_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Timer1.Tick
- Dim lColor As Integer = GetPixel(GetDC(0), 10, 10)
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment