Solved

VB6 printout question ??

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

707 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

13 Experts available now in Live!

Get 1:1 Help Now