D
DSchlichte
Hello
' I need some help. I've created a little application to paint, save and
load pictures (Bitmap-graphics) into
' a picturebox-object on the desktop. There's no problem to paint or to load
pictures, but how can I save the image?
' My load-routine is the following (if I click on the file-menu and chose
File open...):
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MenuItem2.Click
OpenFileDialog1.Title = "Datei öffnen..."
OpenFileDialog1.Filter = "Windows-Bitmap|*.bmp"
OpenFileDialog1.FilterIndex = 1
OpenFileDialog1.ShowDialog()
If OpenFileDialog1.FileName <> "" Then
Dim Filestream As FileStream = New FileStream(OpenFileDialog1.FileName,
FileMode.Open)
Dim binReader As New Bitmap(Filestream)
PictureBox1.Image = binReader
Filestream.Close()
Else : Return
End IfI
End Sub
' Can I also use the Filestream-object for saving pictures. Thank you for
your help.
' I need some help. I've created a little application to paint, save and
load pictures (Bitmap-graphics) into
' a picturebox-object on the desktop. There's no problem to paint or to load
pictures, but how can I save the image?
' My load-routine is the following (if I click on the file-menu and chose
File open...):
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MenuItem2.Click
OpenFileDialog1.Title = "Datei öffnen..."
OpenFileDialog1.Filter = "Windows-Bitmap|*.bmp"
OpenFileDialog1.FilterIndex = 1
OpenFileDialog1.ShowDialog()
If OpenFileDialog1.FileName <> "" Then
Dim Filestream As FileStream = New FileStream(OpenFileDialog1.FileName,
FileMode.Open)
Dim binReader As New Bitmap(Filestream)
PictureBox1.Image = binReader
Filestream.Close()
Else : Return
End IfI
End Sub
' Can I also use the Filestream-object for saving pictures. Thank you for
your help.