🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.visualbasic
Article #1340

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

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

$B$J$s$+F($2J}$,J,$+$C$?5$$,$7$^$9!#(B
$B0J2<$N$d$jJ}$KJQ99$7$F$b0BDjF0:n$7$^$7$?!#(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

    MyFont.Name = Combo1.List(Combo1.ListIndex)
    Set Printer.Font = MyFont

    Dim i As Integer
    For i = 7 To 0 Step -1
        MyFont.Size = i + 6
        Printer.Font.Bold = Not Printer.Font.Bold
        Printer.Font.Bold = Not Printer.Font.Bold
        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

Printer.Font.Bold = Not Printer.Font.Bold
$B$3$l$r(B2$B2s9T$&(BSub$B$r(BVB5Prn$B$H$+$$$&L>A0$G:n@.$7$F!"(BTextWidth$B$N(B
$BA0$K8F$Y$P$J$s$H$+$J$k$h$&$J5$$,$7$^$9!#(B

$BB>$NJ}!9$N>pJs$b4|BT$7$F$$$^$9!#(B
-- 
Terushi Arakawa
mailto:bosturbo@bostn.tsn.or.jp
Technical Details
Message-ID: <5rhg8j$qc@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> <5rhfea$ob@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: <5rhg8j$qc@anise.bostn.tsn.or.jp>
X-Deja-AN: 259685974
References: <5rhbvo$id@anise.bostn.tsn.or.jp> <5rhdpa$lr@anise.bostn.tsn.or.jp> <5rhfea$ob@anise.bostn.tsn.or.jp>
Organization: TSN BBS(bostn), Chigasaki Kanagawa, Japan
Newsgroups: fj.lang.visualbasic