Click here to Skip to main content
15,901,001 members
Home / Discussions / C#
   

C#

 
AnswerRe: Is there a clean way to remove a control and it's associated event handlers? Pin
James T. Johnson22-Jul-03 8:13
James T. Johnson22-Jul-03 8:13 
GeneralRe: Is there a clean way to remove a control and it's associated event handlers? Pin
work_to_live22-Jul-03 9:29
work_to_live22-Jul-03 9:29 
AnswerRe: Is there a clean way to remove a control and it's associated event handlers? Pin
Ista22-Jul-03 9:22
Ista22-Jul-03 9:22 
Generalpassing this as read/write Pin
Ista22-Jul-03 5:29
Ista22-Jul-03 5:29 
GeneralDont look at me funny for asking this Pin
RB@Emphasys22-Jul-03 4:32
RB@Emphasys22-Jul-03 4:32 
GeneralRe: Dont look at me funny for asking this Pin
Ista22-Jul-03 9:23
Ista22-Jul-03 9:23 
Generalremoting.config question Pin
LongRange.Shooter22-Jul-03 4:11
LongRange.Shooter22-Jul-03 4:11 
Generalprobs with print: Generic/Text only :confused: Pin
troels_sorensen22-Jul-03 4:09
troels_sorensen22-Jul-03 4:09 
Hi.

I'm trying to send text to a Epson TM-T88II Reciept printer. the printer is installed as a system printer on win XP.

I've got some drivers from their homepage wich i got to work. the performance however is not acceptable (~30 sec for 20 centimeters).

I tried printing a windows testpage with the MS Generic/Text Only driver. this took ~1 (one!) second for 30 centimeters. So i naturally want to use this driver.
BUT (there is always a 'but'...) When i try to print in my program i get this error:
"The data area passed to a system call is too small".

this is kind of strange since the program has not reacht my printpage event yet....
The program generates the error in system.drawing.printing.OnStartPrint (or something like that) which has nothing to do with anything.. :-/

i've i try a different driver I do not get this error.
I've looked a bit around the web and seen others with similar probs but no solution.
Can anyone help me?!!


here's my code:

---------------------------------
public void PrintBon()
{
try
{
//for text
m_printBon = new PrintDocument();
m_printBon.PrintPage += new PrintPageEventHandler
(this.printBon_PrintBon); <--- Error occurs here. before the program goes to my PrintBon event.

m_printBon.Print();

}
catch(Exception ex)
{
throw ex;
}
}

private void printBon_PrintBon(Object sender, PrintPageEventArgs ev)
{
ev.Graphics.DrawImage(logo, 80, 0, 130, 50);

ev.Graphics.DrawString(m_printString, m_printFont, Brushes.Black, 0, 60);
ev.HasMorePages = false;
}
----------------------
GeneralRe: probs with print: Generic/Text only :confused: Pin
troels_sorensen22-Jul-03 23:52
troels_sorensen22-Jul-03 23:52 
GeneralCall an unknown object Pin
Ista22-Jul-03 3:57
Ista22-Jul-03 3:57 
GeneralRe: Call an unknown object Pin
David Stone22-Jul-03 4:39
sitebuilderDavid Stone22-Jul-03 4:39 
GeneralRe: Call an unknown object Pin
Ista22-Jul-03 8:15
Ista22-Jul-03 8:15 
GeneralRe: Call an unknown object Pin
David Stone22-Jul-03 10:23
sitebuilderDavid Stone22-Jul-03 10:23 
GeneralC++ to C# Pin
zoltan_ie22-Jul-03 0:43
zoltan_ie22-Jul-03 0:43 
GeneralRe: C++ to C# Pin
Mazdak22-Jul-03 0:53
Mazdak22-Jul-03 0:53 
GeneralRe: C++ to C# Pin
zoltan_ie22-Jul-03 0:56
zoltan_ie22-Jul-03 0:56 
GeneralRe: C++ to C# Pin
Mazdak22-Jul-03 1:23
Mazdak22-Jul-03 1:23 
GeneralRe: C++ to C# Pin
zoltan_ie22-Jul-03 1:40
zoltan_ie22-Jul-03 1:40 
GeneralRe: C++ to C# Pin
Mazdak22-Jul-03 1:46
Mazdak22-Jul-03 1:46 
GeneralRe: C++ to C# Pin
Ista22-Jul-03 3:56
Ista22-Jul-03 3:56 
GeneralRe: C++ to C# Pin
Meysam Mahfouzi22-Jul-03 1:46
Meysam Mahfouzi22-Jul-03 1:46 
GeneralRe: C++ to C# Pin
zoltan_ie22-Jul-03 1:49
zoltan_ie22-Jul-03 1:49 
GeneralRe: C++ to C# Pin
Meysam Mahfouzi22-Jul-03 1:58
Meysam Mahfouzi22-Jul-03 1:58 
GeneralRe: C++ to C# Pin
Frank Olorin Rizzi22-Jul-03 7:20
Frank Olorin Rizzi22-Jul-03 7:20 
GeneralRe: C++ to C# Pin
Jim Stewart22-Jul-03 2:50
Jim Stewart22-Jul-03 2:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.