🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.visualbasic
Article #1339

Re: [VB5.0] Printer.TextWidth()

#1339
From: Terushi Arakawa
Date: Mon, 28 Jul 1997 00:00
42 lines
1682 bytes
$B9S@n(B@TSN BBS$B$G$9!#(B

$B0BDjF0:n$r$9$k%3!<%I$r8+$D$1$^$7$?!#(B

$B855-;v$N(BcmdGo_Click()$B$r0J2<$N$b$N$K:9$7BX$($k$H!"$=$l$J$j$NF0:n$r(B
$B$9$k$h$&$G$9!#(B

Private Sub cmdGo_Click()
    Const TESTSTRING As String = "funny function"
    Dim fmtbuf As String * 5

    Dim x As Integer
    Dim y As Integer
    x = Printer.CurrentX
    y = Printer.CurrentY
    Printer.Print
    Printer.CurrentX = x
    Printer.CurrentY = y

    Set Printer.Font = MyFont

    Dim i As Integer
    For i = 7 To 0 Step -1
        MyFont.Name = Combo1.List(Combo1.ListIndex)
        MyFont.Size = i + 6
        RSet fmtbuf = Format(Printer.Font.Size, "0.00")
        Label1(i) = "Printer.Font.Size: " & fmtbuf & _
            ", Printer.TextWidth(" & TESTSTRING & "): " _
            & Printer.TextWidth(TESTSTRING)
    Next
    Printer.KillDoc
End Sub

$B%X%k%W$K:\$C$F$$$k;H$$J}$H$O(BStdFont$B$K%W%m%Q%F%#!<$r@_Dj$9$k=g=x$,(B
$B0c$$$^$9$,!"(BSet Printer.Font = MyFont$B8e$K(BMyFont$B$N%W%m%Q%F%#!<$r(B
$B$$$8$l$P$&$^$/9T$/$h$&$J%$%a!<%8$K8+$($^$9!#(B

#$B$J$s$+%P%0$+;EMMJQ99$N$I$A$i$+$K;W$($F$-$?(B
-- 
Terushi Arakawa
mailto:bosturbo@bostn.tsn.or.jp
Technical Details
Message-ID: <5rhfea$ob@anise.bostn.tsn.or.jp>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <5rhbvo$id@anise.bostn.tsn.or.jp> <5rhdpa$lr@anise.bostn.tsn.or.jp>

Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS
X-Google-Thread: 105c2e,8c6a6fffeb9f863a
X-Google-Attributes: gid105c2e,public
From: bosturbo@anise.bostn.tsn.or.jp (Terushi Arakawa)
Subject: Re: [VB5.0] Printer.TextWidth()
Date: 1997/07/28
Message-ID: <5rhfea$ob@anise.bostn.tsn.or.jp>
X-Deja-AN: 259685973
References: <5rhbvo$id@anise.bostn.tsn.or.jp> <5rhdpa$lr@anise.bostn.tsn.or.jp>
Organization: TSN BBS(bostn), Chigasaki Kanagawa, Japan
Newsgroups: fj.lang.visualbasic