rifter1818
Well-known member
An unhandled exception of type System.ArgumentException occurred in system.drawing.dll
Additional information: Invalid parameter used.
The program [4200] Windows Application.exe has exited with code 0 (0x0).
....
Funny thing is this happens when i ask for any info from the bitmap. i can clone it no problem, but if i ask for size (or in the case of this error getpixel(x,y) with x and y well within the range of bitmaps dimensions....
The line returning the error is the if tbit.getpixel...... one...
PlayArea is a point with small x,y values.
Any ideas what im doing wrong?
Additional information: Invalid parameter used.
The program [4200] Windows Application.exe has exited with code 0 (0x0).
....
Funny thing is this happens when i ask for any info from the bitmap. i can clone it no problem, but if i ask for size (or in the case of this error getpixel(x,y) with x and y well within the range of bitmaps dimensions....
Code:
Windows.Forms.SendKeys.SendWait("+{PRTSC}")
tbit = New Bitmap(1024, 768)
tbit = Windows.Forms.Clipboard.GetDataObject.GetData(GetType(Bitmap))
If tbit.GetPixel(PlayArea.X + 348, PlayArea.Y + 61).ToArgb <> Color.Black.ToArgb Then
tbit.Dispose()
Wait(500)
Else
PlayArea is a point with small x,y values.
Any ideas what im doing wrong?