Hallo @ all
Ich habe in Visual Basic 2008 ein BannerCreator Programmiert.
Der noch leere Banner ist eine PictureBox. Der Text darauf sind Labels und Buttons und andere PictureBoxen. Jetzt will ich machen, dass wenn ich auf einen Button drücke, ein SaveFileDialog kommt und ich speichern kann. Ich will aber dass die buttons die auf der PictureBox sind, mitgespeichert werden.
Danke schonmal
rescuehero96
Willst du es als Bild (JPEG, PNG, BMP, …) speichern?
Oder als ein nur für dein Programm lesbares Format?
Für 1: http://www.vcskicks.com/capture-control-graphics.php
oder: Control.DrawToBitmap(Bitmap bitmap, Rectangle targetBounds)
Für 2: Serialisierung
Grüße, JasonDelife.
Was muss ich da einfügen? Und wo? Ich will das man es als png oder jpg abspeichern kann!
Gruß
rescuehero96
Was muss ich da einfügen? Und wo? Ich will das man es als png
oder jpg abspeichern kann!
Gruß
rescuehero96
Klingt nach fehlenden Grundkenntnissen.
Also ich gehe von einer WinForms-App aus.
Du musst in der Methode zum Speichern mit myPictureBox.DrawToBitmap(…) die PictureBox in ein Bitmap-Objekt zeichnen lassen und dieses mit myBitmap.Save(…) speichern.
Gerade gefunden:
http://www.mycsharp.de/wbb2/thread.php?threadid=29704
Einfacher geht’s wirklich nicht.
Grüße, JasonDelife.