Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Picture Boxes

Status
Not open for further replies.

MrVB50au

Programmer
Mar 16, 2003
326
0
0
AU
Hi,

On my demo app' I have the one form 'Form1'.

On Form1 I have a 'SSPanel1' control that I want 'Picture1' to populate the whole area of the 'SSPanel1'.

Do I need to cover the entire area of the 'SSPanel1' control with 'Picture1' and then insert another picture box as 'Picture2' to be used to tile within 'Picture1' ?

Or is there another way in which this same thing can be achieved?

Thanks for any help,

Andrew G.
 
Try:
Dim x As Long
Dim y As Long

Picture2.AutoSize = True
Picture2.Picture = LoadPicture("MyPicture.jpg")
Picture2.BorderStyle = 0

With Picture1
.ScaleMode = vbTwips
For x = .ScaleLeft To .ScaleWidth Step Picture2.Width
For y = .ScaleTop To .ScaleHeight Step Picture2.Height
.PaintPicture Picture2, x, y
Next y
Next x
End With
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top