The data area passed to a system call is too small

A

alhulimy

i am traing to print usisng printer (samsung srp-350) for invoice
printing
but nothing so far...


-----------------------
Private Sub Button1_Click_4(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click


printFont = New Font("Arial", 10)
Dim pd As New PrintDocument
'pd.PrinterSettings.PrinterName = "HP Deskjet D1400
series"
pd.PrinterSettings.PrinterName = "SAMSUNG SRP350"



AddHandler pd.PrintPage, AddressOf pd_PrintPage

pd.Print()



End Sub
Private Sub pd_PrintPage(ByVal sender As Object, ByVal ev As
PrintPageEventArgs)


ev.Graphics.DrawString("a", printFont, Brushes.Black, 2, 4)

End Sub
 
C

Cor Ligthert[MVP]

Hi,

I don't see this one in your code.
(copied from MSDN)

\\\
If pd.PrinterSettings.IsValid then
pd.Print()
Else
MessageBox.Show("Printer is invalid.")
End If
///

Cor
 
A

alhulimy

Hi,

I don't see this one in your code.
(copied from MSDN)

\\\
 If pd.PrinterSettings.IsValid then
               pd.Print()
            Else
               MessageBox.Show("Printer is invalid.")
            End If
///

Cor

"alhulimy" <[email protected]> schreef in bericht













- ÚÑÖ ÇáäÕ ÇáãÞÊÈÓ -

I add to my code but stilll I face the same problem
any idea ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top