hi all pros,

below is my vb6.0 code. the click command is to save my text and picture. there is no problem for my text.
but, i have a problem after saving the picture. the picture can be saved but it is not availabe for preview.
is there any fix for this ?

Private Sub Command2_Click()
Dim namefile
namefile = Text2 + Text3
Open App.Path & ("/" + namefile + ".txt") For Output As #1
Print #1, Label5.Caption + Text3.Text & vbNewLine; Label6.Caption + Text4.Text & vbNewLine; Label7.Caption + Text5.Text & vbNewLine; Label8.Caption + Text6.Text & vbNewLine; Label9.Caption + Text7.Text & vbNewLine; Label10.Caption + Text8.Text & vbNewLine; Label11.Caption + Text9.Text & vbNewLine; Label12.Caption + Text10.Text & vbNewLine; Label13.Caption + Text11.Text & vbNewLine; Label14.Caption + Text12.Text & vbNewLine; Label15.Caption + Text13.Text & vbNewLine;
Close #1

Dim namefile2
namefile = Text2 + Text3
Open App.Path & ("/" + namefile + ".bmp") For Output As #2
Print #2, Picture1; PictureBox
Close #2
End Sub

please assist! thakns alot!

Recommended Answers

below is my vb6.0 code. the click command is to save my text and picture. there is no problem for my text. but, i have a problem after saving the picture. the picture can be saved but it is not availabe for preview. is there any fix for this …

Jump to Post

All 5 Replies

below is my vb6.0 code. the click command is to save my text and picture. there is no problem for my text. but, i have a problem after saving the picture. the picture can be saved but it is not availabe for preview. is there any fix for this ?

To save picture in PictureBox you should use SavePicture() function :

Dim namefile2
namefile = App.Path & ("/" & Text1 + Text2) & ".bmp"
SavePicture Picture1.Image, namefile
commented: agree +13
commented: - +1
commented: :D +1

variable namefile2 is assigned the nextline namefile

Jx_Man u rocks to the max!!! now i can save my picture from the picture box!!!

thanks everyone that help me !!

You're welcome :)