<b>REGISTER</b>

GFX-Sector - Andere Programmiersprachen


 
GFX-Sector » Coding Area » Andere Programmiersprachen » [VB] Bild speichern OHNE svd » Hello Guest [Login|Register]
Last Post | First Unread Post Print Page | Recommend to a Friend | Add Thread to Favorites

Andere Programmiersprachen

Alles über die anderen Programmiersprachen wie C++, C#, Visual Basic, Java, Ajax und allen anderen Programmiersprachen bitte hier rein.
Post New Thread Post Reply

[VB] Bild speichern OHNE svd

     Deutsche Version  English version
Author
Post « Previous Thread | Next Thread »

dAnIeL1995 dAnIeL1995 is a male
Zauberstabbenutzer


dAnIeL1995 hat kein Avatar

Registration Date: 18.03.2010
Posts: 24
Location: Aachen

Spacer
[VB] Bild speichern OHNE svd

[VB] Bild speichern OHNE svd

      

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)
code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
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.

[VB] Bild speichern OHNE svd 13.04.2010 21:10 dAnIeL1995 is offline Homepage of dAnIeL1995 Search for Posts by dAnIeL1995

Lovely Lovely is a male
Weichzeichner


Lovely hat kein Avatar

Registration Date: 07.08.2009
Posts: 63
Location: Wien
Program: Adobe Photoshop CS4

Spacer
      

Wäre besser wenn du die Fehlermeldung auch zeigen könntest.

Aber der Pfad stimmt nicht ganz:

PictureBox1.Image.Save(C:\Dokumente und Einstellungen\daniel\Desktop\" & count & ".jpg")

Nach Desktop gehört ein Backslash.

Lovely

[VB] Bild speichern OHNE svd 17.04.2010 22:51 Lovely is offline Search for Posts by Lovely

dAnIeL1995 dAnIeL1995 is a male
Zauberstabbenutzer


dAnIeL1995 hat kein Avatar

Registration Date: 18.03.2010
Posts: 24
Location: Aachen

Thread Starter Thread Started by dAnIeL1995
Spacer
      

ah, danke, das war dann wohl der fehler der mir beim ständigen durschauen niuch in sauge gesprungen ist^^

thx

Daniel

[VB] Bild speichern OHNE svd 20.04.2010 15:41 dAnIeL1995 is offline Homepage of dAnIeL1995 Search for Posts by dAnIeL1995
 
Spacer
   
GFX-Sector
unregistered


 hat kein Avatar


Spacer

Have you enjoyed this topic?


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.)

New Post 20.04.2010 15:41  
Tree Structure | Board Structure
Post New Thread Post Reply
GFX-Sector » Coding Area » Andere Programmiersprachen » [VB] Bild speichern OHNE svd

Similar topics to [VB] Bild speichern OHNE svd
Thread
Bilder anzeigen ?! (Forum: Multimedia)
[Anime] 6 Signaturen bilder (Forum: Signaturen/Avatare)
Wie wurde dieses Bild gemacht (Forum: Archiv)
Image Hosting - Bild Ameise (Forum: Archiv)
[Frage] Bild in S/W-Umrisse (Forum: Fragen & Probleme)