迷失森林0.52地图:在vb里如何打印listview

来源:百度文库 编辑:神马品牌网 时间:2024/05/01 03:23:14

Dim i As Long
Dim j As Long
Dim Y As Long
Dim h As Long
Dim m As Long

Printer.Width = 11800
Printer.Height = 2100

For Y = 1 To lvw.ListItems.Count
For m = 1 To lblgongxu.Caption Step 2
Printer.FontSize = 10

Printer.CurrentX = 0
Printer.CurrentY = h
Printer.Print lvw.ListItems(Y).Text

Printer.CurrentX = 1100
Printer.CurrentY = h
Printer.Print lvw.ListItems(Y).SubItems(1)

Printer.CurrentX = 2300
Printer.CurrentY = h
Printer.Print lvw.ListItems(Y).SubItems(2)

Printer.CurrentX = 3100
Printer.CurrentY = h
Printer.Print lvw.ListItems(Y).SubItems(3)

Printer.CurrentX = 4000
Printer.CurrentY = h
Printer.Print lvw.ListItems(Y).SubItems(4)

Printer.CurrentX = 5000
Printer.CurrentY = h
Printer.Print m

Printer.CurrentX = 6000
Printer.CurrentY = h
Printer.Print m + 1

Printer.CurrentX = 7000
Printer.CurrentY = h
Printer.Print lvw.ListItems(Y).Text

h = h + 700

If h > 2100 Then
h = 0
Printer.NewPage
End If
Next
Next
Printer.EndDoc