Imports System.Drawing.Printing
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim pd As New PrintDocument()
AddHandler pd.PrintPage, AddressOf Me.pd_PrintPage
pd.Print()
Catch ex As Exception
MessageBox.Show("Обломись!", ex.ToString())
End Try
End Sub
Private Sub pd_PrintPage(ByVal sender As Object, ByVal ev As PrintPageEventArgs)
ev.Graphics.DrawImage(Image.FromFile("C:\Trampa\1.jpg"), ev.Graphics.VisibleClipBounds)
ev.HasMorePages = False
End Sub
End Class
Сейчас этот форум просматривают: Yandex-бот и гости: 2