|
-
Feb 24th, 2000, 01:03 PM
#1
Thread Starter
Fanatic Member
Uhhh, how do u print listview contents???
-
Feb 24th, 2000, 06:59 PM
#2
Addicted Member
I not use listview but if it on a form you may can print it out with a picturebox
Aaron Young gave me this
Add a Picturebox to your Form..
code: picturebox1.visible = false
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Private Const SRCCOPY = &HCC0020
Private Sub Form_Load()
ScaleMode = vbPixels
With Picture1
.Visible = False
.BorderStyle = vbBSNone
.ScaleMode = vbPixels
.AutoRedraw = True
End With
End Sub
Private Sub Command1_Click()
Dim W As Integer
Dim H As Integer
Dim X As Integer
Dim Y As Integer
Dim oX As Single
Dim oY As Single
oX = Left
oY = Top
W = 400
H = 400
Picture1.Move 0, 0, ScaleWidth, ScaleHeight
For Y = 0 To Int(ScaleHeight / H) + 1
For X = 0 To Int(ScaleWidth / W) + 1
Move ScaleX(-X * W, vbPixels, vbTwips), ScaleY(-Y * H, vbPixels, vbTwips)
DoEvents
BitBlt Picture1.hDC, X * W, Y * H, W, H, hDC, X * W, Y * H, SRCCOPY
Next
Next
Move oX, oY
Printer.PaintPicture Picture1.Image, 0, 0
Printer.EndDoc
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|