Im trying to use a code I found to create a screen capture program. everything seems to work well untill the debugger picks up the following error:
Dim bmpData As BitmapData = bmp.LockBits(New Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.[ReadOnly], PixelFormat.Format24bppRgb)
An unhandled exception of type ‘System.InvalidOperationException’ occurred in System.Drawing.dll
Message=Bitmap region is already locked.
I have pasted the full code on pastie: http://pastie.org/pr...9xmpy5ejumtdwxw
many many thanks to anyone that wants to help!