Follow along with the video below to see how to install our site as a web app on your home screen.
Nota: This feature may not be available in some browsers.
Me.Opacity = 0 'nascondo la finestra per lo scatto
Me.ShowInTaskbar = False 'nascondo l'icona del programma dalla barra delle applicazioni
Dim bounds As Rectangle
Dim screenshot As System.Drawing.Bitmap
Dim graph As Graphics bounds = Screen.PrimaryScreen.Bounds
screenshot = New System.Drawing.Bitmap(bounds.Width, bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb )
graph = Graphics.FromImage(screenshot)
graph.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy)
PictureBox1.Image = screenshot 'visualizzo l'immagine appena creata sul PictureBox
Me.Opacity = 100 'ripristino la finestra
Me.ShowInTaskbar = True 'ripristino l'icona nella barra delle applicazioni
Dim savefiledialog1 As New SaveFileDialog
Try
savefiledialog1.Title = "Salva cattura"
savefiledialog1.FileName = "*.bmp"
savefiledialog1.Filter = "Bitmap |*.bmp"
If savefiledialog1.ShowDialog() = DialogResult.OK Then
PictureBox1.Image.Save(savefiledialog1.FileName, System.Drawing.Imaging.ImageFormat.Bmp)
End If
Catch ex As Exception
End Try
Sistemato.Non voglio mettere in dubbio il fatto che l'hai fatto tu.. comunque potresti editare e riscriverlo con una sintassi quanto meno un pò piu leggibile ?
Grazie.