Hallo, benutze VB o8 Express Edition. Habe ein Screenshot prog, bzw. mache gerade eins. Es soll die Bilder automatisch speichern, ohne das der savefiledialog (svd) benutzt wird. Also man klickt auf den Button "Save" und schon hat man das Bild auf dem Desktop. Habe bisher nur mit svd. Möchte es aber ohne haben. Bisher siehts so aus:
(Entschiedende Teil in den Zeilen 20 unf folgende)
Public Class Form1
Dim count As Integer
Private Sub dopicture()
Dim picture As New Bitmap(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)
Dim graphic As Graphics = Graphics.FromImage(picture)
graphic.CopyFromScreen(0, 0, 0, 0, picture.Size)
PictureBox1.Image = picture
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
System.Threading.Thread.Sleep(500)
dopicture()
Me.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
count = count + 1
SaveFileDialog1.FileName = count
Me.SaveFileDialog1.ShowDialog()
Me.PictureBox1.Image.Save(Me.SaveFileDialog1.FileName)
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Me.Hide()
System.Threading.Thread.Sleep(500)
dopicture()
Me.Show()
count = count + 1
SaveFileDialog1.FileName = count
SaveFileDialog1.ShowDialog()
Me.PictureBox1.Image.Save(Me.SaveFileDialog1.FileName)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Timer1.Interval = tmr.Text
Timer1.Enabled = True
End Sub
End Class
Habe den Code
code:
1:
PictureBox1.Image.Save(C:\Dokumente und Einstellungen\daniel\Desktop" & count & ".jpg")
gefunden, aber da komtm beim letzendlichem ausführen eine Fehlermeldung -.-
Würde mich freuen wenn mir wer helfen könnte
Daniel
This post has been edited 6 time(s), it was last edited by dAnIeL1995: 13.04.2010 21:13.
If you were enjoying this post and if you keen on reading more interesting stuff then do not hesitate to complete the free sign up.
After the free registration you will gain access to all areas and you will be able to communicate with other artists from all over the world.
In addition you will benefit from our Photoshop and coding section as well as from our huge (hundreds of gigabytes) free resource section where you can find everything you will need to be a successful (web) designer/artist.
Sign up now and enjoy the advantages as a registered member.
(This website will be ad-free after a complete free sign up.)