Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 135
  • Last Modified:

question on printing?

I would like to ask ,how to do the printing for the vb program?let said I have a form that have to print by the format that I want.thanks you
0
leeboonseong
Asked:
leeboonseong
1 Solution
 
TonyS020799Commented:
Hello leeboonseong,
You have many outdated questions that require your attention before continuing here.  Please ensure to maintain your questions by closing them out and awarding an appropriate grade once a solution has been reached, and constantly keeping experts up to date on your status by leaving comments in your question in response to the experts' posts.  Now, your open questions that require your attention:

http://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20075729
http://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20064925
http://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20033930
http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20123425
http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20127389
http://www.experts-exchange.com/jsp/qShow.jsp?ta=mssql&qid=20015629


Please update these questions.  If they have been answered, award an appropriate grade.  Grading guidelines can be found here:
http://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp

Note that the experts here help for free.  Many do look at your profile prior to helping.  If they see someone who often gives poor grades, or leaves many questions open and unfinished, it shows them that the questioner has a lack of appreciation for the help they receive here.  The experts will then move on to answer other questions asked by those who do practice good grading habits and show a high appreciation for the free assistance they receive.  Please do your best to maintain your questions from now on.  Failure to do so is grounds for account termination at this site.


TonyS
Community Support Moderator @ Experts Exchange
0
 
mhowlingCommented:
Heres an example of how to print in vb.

Private Sub PrintReport(ReportName as String)
  Dim LoopIndex as Long, Y as Long
  Dim ReportText as String

  ReportText = "THIS IS A TEST LINE "

'begin printing
  Printer.FontSize=14
  DrawText 400,100,ReportName

  Y=200
  'draw 10 lines
  For LoopIndex =1 to 10
    DrawText 400, Y, ReportText & Cstr(LoopIndex)
    Y=Y+Printer.TextHeight("X")
  Next
 'send report to printer
 Printer.EndDoc
End Sub

Private Sub DrawText(X as Long, Y as Long, Text as String)
'a simple routine to print text at a specified location on
'a printed report
  Printer.CurrentX=X
  Printer.CurrentY=Y
  Printer.Print Text;
End Sub

NOTE := The DrawText routine should be expanded to take into consideration linebreaks and word wrapping but this would complicate this example.
0
 
DanRollinsCommented:
Hi leeboonseong,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Accept mhowling's comment(s) as an answer.

leeboonseong, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
Computer101Commented:
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now