Oppure

Loading
04/09/09 6:59
kejan
non mi sta funzionando....
ti chiedo per favore col codice che ti do al inizio del post ci puoi dare una sistemata per aggiungere sta parte del testo^^
aaa
04/09/09 8:27
secretfabios
Ragazzo mio...un po di fantasia no eh?
Public Class Form1
    Public Shared Function ScreenShot() As Bitmap
        SendKeys.SendWait("^{PRTSC}")
        Dim Obj As IDataObject = Clipboard.GetDataObject
        If (Obj.GetDataPresent(DataFormats.Bitmap)) Then
            Dim Img As Bitmap = New Bitmap(CType((Obj.GetData("System.Drawing.Bitmap")), Bitmap))
            Dim Instance As Graphics = Graphics.FromImage(Img)
            Dim s As String = "PC BLOCCATO"
            Dim font As Font = New Font("Arial", 30, FontStyle.Regular Or FontStyle.Bold)
            Dim brush As Brush = Brushes.Red
            Dim pointx As String = 500
            Dim pointY As String = 500
            Instance.DrawString(s, font, brush, pointx, pointY)
            Return Img
        End If
        Return Nothing
    End Function
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        'Destinazione
        ScreenShot.Save(My.Application.Info.DirectoryPath + "ciao.jpg")
    End Sub
End Class
aaa