VERSION 5.00 Begin VB.Form Form1 Caption = "Form1" ClientHeight = 7860 ClientLeft = 60 ClientTop = 450 ClientWidth = 10815 LinkTopic = "Form1" ScaleHeight = 7860 ScaleWidth = 10815 StartUpPosition = 3 'Windows Default Begin VB.PictureBox Picture1 AutoRedraw = -1 'True Height = 11520 Left = -120 ScaleHeight = 11460 ScaleWidth = 15300 TabIndex = 0 Top = 0 Width = 15360 Begin VB.CommandButton Command1 Caption = "Take Image" Height = 615 Left = 240 TabIndex = 1 Top = 120 Width = 1815 End End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long Private Sub Command1_Click() Form1.WindowState = 1 For a = 1 To 10000 Next c = GetDC(0) For a = 1 To 1024 For b = 1 To 768 h = GetPixel(c, a, b) Form1.Picture1.PSet (a * 15, b * 15), h Next Next End Sub Form1.WindowState = 0