2 namedajipai namedajipai 于 2016.03.06 23:11 提问

函数一屏幕显示不下,如何实现翻屏显示?

Visual Basic 6.0Print函数一屏幕显示不下,如何实现翻屏显示?Print的翻屏功能怎么做?

5个回答

caozhy
caozhy   Ds   Rxr 2016.03.06 23:14
已采纳

用TextBox好了,设置Multiline属性为true,以及设置Scrollbars=Both

u013596119
u013596119   Rxr 2016.03.06 23:27

试下

 Print(Me, PowerPacks.Printing.PrintForm.PrintOption.Scrollable)
namedajipai
namedajipai VB6.0
接近 2 年之前 回复
WinsenJiansbomber
WinsenJiansbomber   2016.03.07 10:33

变通点啊,将内容输出到文件,调用system用more命令显示就可以了。或都将内容分拆,用多条Print,检测用户按键状态,相应输出其它内容

u013596119
u013596119   Rxr 2016.03.07 14:09

没试过,可以试下

 Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _
ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

Private Const VK_MENU As Byte = &H12
Private Const VK_SNAPSHOT As Byte = &H2C
Private Const KEYEVENTF_KEYUP = &H2

Private Sub PrintTheForm()
Dim lWidth As Long, lHeight As Long
    Clipboard.Clear
    Call keybd_event(VK_MENU, 0, 0, 0)
    Call keybd_event(VK_SNAPSHOT, 0, 0, 0)
    DoEvents
    Call keybd_event(VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0)
    Call keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0)
    Printer.Print
    If Width > Printer.ScaleWidth Then
        lWidth = Printer.ScaleWidth
        lHeight = (Printer.ScaleWidth / Width) * Height
    Else
        lWidth = Width
        lHeight = Height
    End If
    Printer.PaintPicture Clipboard.GetData, 0, 0, lWidth, lHeight
    Printer.EndDoc
End Sub
lx624909677
lx624909677   Ds   Rxr 2016.03.07 16:04

直接加滚动条多方便呢

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!