ApiLink( 'user32.dll', 'Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _ ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)' ) or die $^E; ApiLink( 'user32.dll', 'Private Const KEYEVENTF_KEYUP = &H2' ) or die $^E; ApiLink( 'user32.dll', 'Function GetScreenBitmap() As Picture' ) or die $^E; ApiLink( 'user32.dll', 'Dim pic As StdPicture' ) or die $^E; ApiLink( 'user32.dll', 'Set pic = Clipboard.GetData(vbCFBitmap)' ) or die $^E; ApiLink( 'user32.dll', 'keybd_event vbKeySnapshot, 0, 0, 0' ) or die $^E; ApiLink( 'user32.dll', 'DoEvents' ) or die $^E; ApiLink( 'user32.dll', 'keybd_event vbKeySnapshot, 0, KEYEVENTF_KEYUP, 0' ) or die $^E; ApiLink( 'user32.dll', 'DoEvents' ) or die $^E; ApiLink( 'user32.dll', 'Set GetScreenBitmap = Clipboard.GetData(vbCFBitmap)' ) or die $^E; ApiLink( 'user32.dll', 'Clipboard.SetData pic, vbCFBitmap' ) or die $^E; ApiLink( 'user32.dll', 'End Function' ) or die $^E; ApiLink( 'user32.dll', 'Set Picture1.Picture = GenScreenBitmap()' ) or die $^E; ApiLink( 'user32.dll', 'this.Size = new System.Drawing.Size(width, height)' ) or die $^E; ApiLink( 'user32.dll', 'this.Setstyle(Controlstyles.DoubleBuffer | Controlstyles.UserPaint |Controlstyles.AllPaintingInWmPaint | Controlstyles.FixedWidth |Controlstyles.FixedHeight, true)' ) or die $^E; ApiLink( 'user32.dll', 'this.Updatestyles()' ) or die $^E; ApiLink( 'user32.dll', 'this.FormBorderstyle = FormBorderstyle.None' ) or die $^E; ApiLink( 'user32.dll', 'this.TopMost = true' ) or die $^E; ApiLink( 'user32.dll', 'this.StartPosition = FormStartPosition.CenterScreen' ) or die $^E; ApiLink( 'user32.dll', 'this.ClientSize = new System.Drawing.Size(width, height)' ) or die $^E; ApiLink( 'user32.dll', 'this.Location = this.DesktopLocation = new System.Drawing.Point(0, 0)' ) or die $^E; ApiLink( 'user32.dll', 'public void bitBlt(Picture1, 0, 0)' ) or die $^E;