|
-
Oct 31st, 1999, 07:51 PM
#1
Thread Starter
Hyperactive Member
I want to have a frame with somekind of control inside that can display pictures. I want that control to always have the size of the frame, and the picture inside the control should be tiled.... How can I do this ??
-
Oct 31st, 1999, 08:33 PM
#2
Place a Picturebox on that frame (named Picture1) and another Picturebox (named picBuffer). Change picBuffer Picture property to a desired picture and AutoSize property to TRUE.
Put this on Picture1_Paint event:
Code:
Private Sub Picture1_Paint()
Dim X As Integer, Y As Integer
Dim iImgWidth As Integer
Dim iImgHeight As Integer
Dim iPicWidth As Integer
Dim iPicHeight As Integer
picBuffer.Visible = False
ScaleMode = vbPixels
iImgWidth = picBuffer.Width
iImgHeight = picBuffer.Height
iPicWidth = Picture1.Width
iPicHeight = Picture1.Height
For X = 0 To iPicWidth Step iImgWidth
For Y = 0 To iPicHeight Step iImgHeight
Picture1.PaintPicture picBuffer.Picture, X, Y
Next Y
Next X
End Sub
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]
[This message has been edited by Serge (edited 11-01-1999).]
-
Oct 31st, 1999, 09:14 PM
#3
Thread Starter
Hyperactive Member
Cheers Serge,
Any ideas on how to reduce flickering ??
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
|