我已经可以将文件另存为.jpeg,但是图像无法加载,有人建议吗?
Private Sub Btnconfirm_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnconfirm.Click
MsgBox("A receipt will now be saved to your files", vbOKOnly, "Thank you for your purchase")
SaveFileDialog1.ShowDialog()
MsgBox("Thank you for choosing Tiny Theatre, have a nice day.", vbOKOnly, "Thank you")
Me.Close()
End Sub
Private Sub SaveFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles SaveFileDialog1.FileOk
Dim FileToSaveAs As String = SaveFileDialog1.FileName
Dim objwriter As New System.IO.StreamWriter(FileToSaveAs)
objwriter.Write(PictureBox1)
objwriter.Close()
End Sub
Run Code Online (Sandbox Code Playgroud)