Solved

VB6 printout question ??

Posted on 2004-03-21
1
395 Views
Last Modified: 2013-12-25

Hi experts  I have one small question 4 you.

I would like to print my text1 and text2 on particular coordinates  (x,y).
Please write me the source code.

thanks

.
0
Comment
Question by:datan00b
1 Comment
 
LVL 27

Accepted Solution

by:
Dabas earned 135 total points
ID: 10644770
Hi datan00b:
Public Sub PrintAt(intX As Single, intY As Single, strText As String, _
    Optional intFontSize As Integer, Optional strFontName As String, _
    Optional blnBold As Variant)
    Printer.CurrentX = intX
    Printer.CurrentY = intY
    If strFontName <> "" Then
        On Error Resume Next
        Printer.FontName = strFontName
        Printer.Print "";
    End If
   
    If intFontSize <> 0 Then
        SetFontSize (intFontSize)
    End If
    If Not IsMissing(blnBold) Then
        Printer.FontBold = blnBold
    End If
    Printer.Print strText
End Sub

Dabas
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now