Solved

VB6 printout question ??

Posted on 2004-03-21
1
398 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA: Select SQL query based on a config Sheet v2 11 44
Can we place a tooltip on the actual vb6 form 5 41
Passing a Text Box name to a Sub 6 96
RUNRMTCMD from AS/400 12 44
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

786 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