Dim pbx As WinForm.PictureBox
pbx = Forms("窗口2").Controls("PictureBox1")
pbx.SizeMode = ImageSizeMode.Zoom
Dim dlg As New OpenFileDialog
dlg.Filter= "图形文件|*.bmp;*.jpg;*.gif"
If dlg.ShowDialog = DialogResult.Ok Then
pbx.ImageFile = Nothing
FileSys.CopyFile(dlg.Filename, "d:\打印照片.jpg",True)
pbx.ImageFile = "d:\打印照片.jpg."
End If