Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Alceus Screenshot Taker - frmAllScreen.frm

frmAllScreen.frm

Caricato da: Alceus
Scarica il programma completo

  1. Private Sub Cattura()
  2. 'Sub per catturare lo schermo intero
  3. '
  4. 'Consente l'Autoredraw della Picture1
  5. Picture1.AutoRedraw = True
  6. 'Setta come immagine della Picture1 lo screenshot dello schermo intero
  7. StretchBlt Picture1.hdc, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight, DC, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight, vbSrcCopy
  8. 'Disattiva il Timer1
  9. Timer1.Enabled = False
  10. 'Rende il form visibile
  11. Me.Visible = True
  12. 'Salva temporaneamente l'immagine ottenuta
  13. SavePicture Picture1.Image, App.Path & "\Catture temporanee\Cattura temporanea.bmp"
  14. 'Rende invisible il form
  15. Me.Visible = False
  16. 'Mostra il form frmPartScreen
  17. frmPartScreen.Show
  18. ParteSchermo = False     'Setta la variabile ParteSchermo come false
  19. End Sub
  20.  
  21. Private Sub Form_Load()
  22. 'Rende invisibile il form
  23. Me.Visible = False
  24. 'Imposta due valori simbolici per settare al massimo la grandezza del form
  25. '(soluzione forzata: con Screen.Width dava problemi)
  26. Me.Height = 99999
  27. Me.Width = 99999
  28. 'Sposta il form in alto a sinistra sullo schermo
  29. Me.Top = 0
  30. Me.Left = 0
  31. 'Rende la Picture1 grande come tutto il form
  32. Picture1.Height = Me.Height
  33. Picture1.Width = Me.Width
  34. 'Si ritrova l'handle DC dello schermo grafico (finestra 0) e lo si memorizza nella variabile DC
  35. DC = GetDC(0)
  36. 'Attiva il Timer1
  37. Timer1.Enabled = True
  38. End Sub
  39.  
  40. Private Sub Form_Unload(Cancel As Integer)
  41. 'Dealloca l'handle DC
  42. ReleaseDC 0, DC
  43. End Sub
  44.  
  45. Private Sub Form_Initialize()
  46. 'Rende il form in stile Xp
  47. InitCommonControls
  48. End Sub
  49.  
  50.  
  51. Private Sub Timer1_Timer()
  52. 'Richiama la sub Cattura per catturare lo schermo intero
  53. Cattura
  54. End Sub