Udskriv et billeder
Jeg vil gerne bruge Microsoft Common Dialog til at udskrive et billede. Jeg kan fint få den til at udskrive tekst:Dim TodaysDate As Variant
Dim HorizontalMargin As Single
Dim VerticalMargin As Single
Dim BeginPage As Single, EndPage As Single
Dim NumCopies As Single
Dim SheetStyleText As String 'WorkSheet
Dim SheetStyleTextWidth As Single
Dim JobNumberText As String 'JobNo ###
Dim JobNumberTextWidth As Single
Dim CompanyNameText As String '###
Dim CompanyNameTextWidth As Single
Dim JobDescriptionText As String
Dim JobDescriptionTextWidth As Single
Dim JobFontText As String '###
Dim JobFontTextWidth As Single
Dim JobFontSizeText As String '###
Dim JobFontSizeTextWidth As Single
Dim SideTaeller As Integer
Dim f As Integer ' counter for anystring()
Dim NR As Integer
CommonDialog1.CancelError = True
CommonDialog1.ShowPrinter ' Display the Print dialog box
Printer.ScaleMode = 6 'millimeters
HorizontalMargin = CommonDialog1.PrinterDefault
VerticalMargin = CommonDialog1.PrinterDefault
BeginPage = CommonDialog1.FromPage
EndPage = CommonDialog1.ToPage
NumCopies = CommonDialog1.Copies
HorizontalMargin = 5 + HorizontalMargin
VerticalMargin = 1 + VerticalMargin
Printer.FontName = "Arial"
Printer.FontSize = 10
Printer.FontBold = False
Printer.FontItalic = False
Printer.FontUnderline = False
Printer.FontStrikethru = False
Printer.ForeColor = RGB(0, 0, 0)
Printer.CurrentX = HorizontalMargin
Printer.CurrentY = VerticalMargin
Printer.Print "Dette er en test"
Objectet har en metode der hedder PaintPicture:
Printer.PaintPicture(......
Men jeg kan ikke lige hitte ud af hvordan den skal bruges.
Mvh
SeeQue