The pixel format in LockBits must be compatible with the format of the bitmap you want to lock...A simple
new Bitmap(w,h)
with no additional parameters will create a 32 bit RGB image, and it can not be locked as 16 bit gray-scale!!!
Use the constructor variant that can get pixel format too:
https://msdn.microsoft.com/en-us/library/3z132tat(v=vs.110).aspx[
^]
Dim Bitmap As New Bitmap(100, 100, PixelFormat.Format16bppGrayScale)