Click here to Skip to main content
15,913,270 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all how can i clear the local printers queue through a vb app, i've been experiencing a problem that the print button gets pushed too many times and the jobs queue up and the printer wont print, looking for a way to clear the printer queue each time the button is clicked, please help with this kinda urgent

regards
Wesley

code below is the button click event for the printer to print
VB
Private Sub PictureBox48_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox48.Click
        ' USER HAS FINISHED TYPING IN THEIR DETAILS - NOW PRINT DT CARD

        If ((Not (TextBox4.Text.Trim(" ") = "")) And (Not (TextBox5.Text.Trim(" ") = ""))) Then

            Dim dt_card As New dt_card_printer

            dt_card.names = TextBox4.Text & " " & TextBox5.Text

            dt_card.Print()

            dt_card.Dispose()

        End If
    End Sub
Posted

1 solution

Below are few links

Clear jobs in local printer queue[^]


http://www.xtremevbtalk.com/showthread.php?t=197690[^]



Accept and vote if helps otherwise revert back
--RDB
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900