Does anyone know why I would get a compile error 426 "Variable Expected" with this PBWin9 code:
The keybd_event appears to put a bitmap on the clipboard - I can paste it into other programs.
Help says 426 might be from using a reserved variable name. I used several names, but still get the error.
I dropped the "TO" (which Help says is optional) and the compile error goes away, but then iResult& gets a 0 during execution, indicating the operation was unsuccessful.
Code:
Local hImage as DWord, iResult& keybd_event(%VK_SnapShot, 1, 0, 0) 'active dialog to clipboard Clipboard Get Bitmap To hImage, iResult&
Help says 426 might be from using a reserved variable name. I used several names, but still get the error.
I dropped the "TO" (which Help says is optional) and the compile error goes away, but then iResult& gets a 0 during execution, indicating the operation was unsuccessful.
Comment