Visual basic 6 doesn't support “*.tif” files.
Visual basic 6 loads pictures in image or picture box controls.
And loads only pictures with the: “*.bmp”, “*.cur”, “*.dib”,“*.emf”, “*.gif”,“*.ico”, “*.jpg” or “*.wmf” extensions.
You have to change extension from “*.tif” to for example “*.bmp” (how to do that: open “*.tif” file with “Paint” and Save As like “*.bmp” file) and then put into your VB project:
For example:
1. ImgMyPicture.Picture = LoadPicture(App.Path & "\OnePicture.bmp"
‘one way
2. Or in design mode, load the picture, in image or picture box
controls, in their properties. - other way
For printing image files VB6 uses Printer object and
PaintPicture method for example:
Sub PrintPictires()
Dim c As Control
For Each c In Controls
If TypeOf c Is Image Then
Printer.CurrentX = c.Left
Printer.CurrentY = c.Top
Printer.PaintPicture c.Picture, c.Left, c.Top
End If
If TypeOf c Is PictureBox Then
Printer.CurrentX = c.Left
Printer.CurrentY = c.Top
c.AutoSize = True
c.Refresh
c.AutoSize = False
Printer.PaintPicture c.Picture, c.Left, c.Top
End If
Next c
Printer.EndDoc
End Sub
Maybe this will help you.