Guest User

Untitled

a guest
Oct 19th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. Private Sub cmdSSMap_Click()
  2. Dim Rec As RECT, hdc As Long, i As Long
  3. ' If debug mode, handle error then exit out
  4. If Options.Debug = 1 Then On Error GoTo errorhandler
  5.  
  6. ' *************
  7. ' Plain Broken. Direct3D8 is a fucking pain in the ass.
  8. ' Please note that this is a WORKAROUND to get it to work right now.
  9. ' Will have to look into a proper fix in the future.
  10. ' *************
  11.  
  12. hdc = GetDC(frmMain.picScreen.hwnd)
  13. BitBlt frmMain.picScreen.hdc, 0, 0, ScreenX, ScreenY, hdc, 0, 0, SRCCOPY
  14. Call ReleaseDC(frmMain.picScreen.hwnd, hdc)
  15.  
  16. Do While FileExist("\screenshots\" & str$(i) & ".bmp") = False
  17. i = i + 1
  18. Loop
  19.  
  20. SavePicture frmMain.picScreen.Image, App.Path & "\screenshots\" & str$(i) & ".bmp"
  21.  
  22. ' Error handler
  23. Exit Sub
  24. errorhandler:
  25. HandleError "cmdSSMap_Click", "frmMain", Err.Number, Err.Description, Err.Source, Err.HelpContext
  26. Err.Clear
  27. Exit Sub
  28. End Sub
Add Comment
Please, Sign In to add comment