Click here to Skip to main content
15,868,217 members
Please Sign up or sign in to vote.
1.00/5 (8 votes)
See more:
i need coding..
click a button printout will come,that source is .txt file..
you may use ms-dos or c#..
Posted
Comments
Nickos_me 3-Nov-11 7:43am    
Ms-Dos or C#? o-=O
It's homework? :)

1 solution

C#
StreamReader sr=new StreamReader("C:\\Test.txt")
int count=File.ReadAllLines("C:\\Test.txt").Length;
for(int i=0;i<count;i++)>
{
MessageBox.Show(sr.ReadLine());
}


Then Add your project PrintDialog and PrintDocument, and if you want to see a preview PrintPreview.And a little search for these on www.google.com please.
 
Share this answer
 
v2
Comments
fjdiewornncalwe 3-Nov-11 14:36pm    
Please don't answer blatant homework questions like this. What will the OP achieve by handing in your answer as his own?
SercanOzdemir 3-Nov-11 14:44pm    
You are right but iam just trying to help.Sorry for any inconvenience
kalaiking 5-Nov-11 6:55am    
thanks..
i am doing billing software.. after bill print whole roll paper is ejected (dot matrix)..
guide me to stop eject paper through c#..

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