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 L +ong)' ) or die $^E; ApiLink( 'user32.dll', 'Private Const KEYEVENTF_KEYUP = &H2' ) or +die $^E; ApiLink( 'user32.dll', 'Function GetScreenBitmap() As Picture' ) o +r 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 d +ie $^E; ApiLink( 'user32.dll', 'DoEvents' ) or die $^E; ApiLink( 'user32.dll', 'keybd_event vbKeySnapshot, 0, KEYEVENTF_KE +YUP, 0' ) or die $^E; ApiLink( 'user32.dll', 'DoEvents' ) or die $^E; ApiLink( 'user32.dll', 'Set GetScreenBitmap = Clipboard.GetData(vb +CFBitmap)' ) or die $^E; ApiLink( 'user32.dll', 'Clipboard.SetData pic, vbCFBitmap' ) or di +e $^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 | Contro +lstyles.FixedWidth |Controlstyles.FixedHeight, true)' ) or die $^E; ApiLink( 'user32.dll', 'this.Updatestyles()' ) or die $^E; ApiLink( 'user32.dll', 'this.FormBorderstyle = FormBorderstyle.Non +e' ) or die $^E; ApiLink( 'user32.dll', 'this.TopMost = true' ) or die $^E; ApiLink( 'user32.dll', 'this.StartPosition = FormStartPosition.Cen +terScreen' ) 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 d +ie $^E;
Therefore the first question is if i'm using Win32::API correctly ?
The second question would be - if it's possible to join all these lines into one code (VB / .Net / C++) ?
In reply to Multiple API calls by thenetfreaker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |