posted by hitman.1 on 2010-02-07 15:39:08
Hello, I am creating a software that allows you to print an image on your system, I created a button to cancel print and one for the press, but I can not figure out how to kill the print.
 
Imports System.Drawing.Printing
 
 
Public Class Form2
 
    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        MsgBox(Print box")
    End Sub
 
    Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
 
        If PictureBox1.Visible = True Then
            If My.Computer.FileSystem.FileExists("C:\Documents and Settings\Desktop\*\einsten vs conti.jpg") Then
                e.Graphics.DrawImage(Image.FromFile("C:\Documents and Settings\Desktop\*\einsten vs conti.jpg"), 20, 50, 40, 60)
            Else
                MsgBox("File don' t found.")
 
            End If
        End If
 
 
    End Sub
 
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
 
        PrintDocument1.Print()
 
    End Sub
    Public Sub killdoc()
 
    End Sub
 
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        killdoc()
 
    End Sub
End Class
 
.


Answer the question



Top Users
  • dail (12)
  • livin52 (3)
  • camu (3)
  • softweb (2)
  • Nadine (1)
  • Josware (1)
  • lfelipecr (1)
  • gregoriohc (1)
  • Mitu (1)
  • ryan714 (1)