469,307 Members | 1,527 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,307 developers. It's quick & easy.

The data area passed to a system call is too small



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

--------------------------
it works witht othre pritners but this samsung srp-350 is not working

as a result from the code above i got this exception:
--------------------------
An unhandled exception of type 'System.ComponentModel.Win32Exception'
occurred in system.drawing.dll
Additional information: The data area passed to a system call is too
small
----------------------------------------------
any idea how to sovlve this ?
Jun 27 '08 #1
2 3988
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" <al******@gmail.comschreef in bericht
news:43**********************************@m45g2000 hsb.googlegroups.com...
>

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

--------------------------
it works witht othre pritners but this samsung srp-350 is not working

as a result from the code above i got this exception:
--------------------------
An unhandled exception of type 'System.ComponentModel.Win32Exception'
occurred in system.drawing.dll
Additional information: The data area passed to a system call is too
small
----------------------------------------------
any idea how to sovlve this ?
Jun 27 '08 #2
On 11 مايو, 08:58, "Cor Ligthert[MVP]" <notmyfirstn...@planet.nl>
wrote:
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" <alhul...@gmail.comschreef in berichtnews:43**********************************@m 45g2000hsb.googlegroups.com...


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
--------------------------
it works witht othre pritners but this samsung srp-350 is not working
as a result from the code above i got this exception:
--------------------------
An unhandled exception of type 'System.ComponentModel.Win32Exception'
occurred in system.drawing.dll
Additional information: The data area passed to a system call is too
small
----------------------------------------------
any idea how to sovlve this ?- إخفاء النص المقتبس -

- عرض النص المقتبس -
I add to my code but stilll I face the same problem
any idea ?
Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by jeet_sen | last post: by
10 posts views Thread by Markgoldin | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.