Hi all,
I recently posted a request for help on this matter but while waiting for a response I managed to come up with the solution and here it is.
CONTROLS USED:
Form1
SSPanel1
inside SSPanel1 are:
Picture1 sized to SSPanel1
Picture2 inside Picture1 to tile on Picture1
SOURCE CODE USED:
This code is only for those users who run Win98.
The Alphablending.dll file can be located by searching at yahoo... Simply type: Alphablending.dll and you'll see the search result.
Andrew G.
Option Explicit
Private Declare Function AlphaBlending Lib "Alphablending.dll" (ByVal destHDC As Long, ByVal XDest As Long, ByVal YDest As Long, ByVal destWidth As Long, ByVal destHeight As Long, ByVal srcHDC As Long, ByVal XSrc As Long, ByVal YSrc As Long, ByVal srcWidth As Long, ByVal srcHeight As Long, ByVal AlphaSource As Long) As Long
Private Sub MyAlphaBlend(destObject As PictureBox, srcObject As PictureBox, rows As Integer, col As Integer, depth As Long)
Dim i, j As Integer
Dim myheight, mywidth As Variant 'Width and Height.
'
'Get Picture1.Height, store it in variable 'myheight'.
myheight = srcObject.Height
'
'Get Picture1.Width, store it in variable 'mywidth'.
mywidth = srcObject.Width
'
'Use a nested 'For Loop' to create 8 across, 8 down.
For i = 0 To rows
For j = 0 To col
AlphaBlending destObject.hDC, (i * mywidth), (j * myheight), srcObject.ScaleWidth, srcObject.ScaleHeight, srcObject.hDC, 0, 0, srcObject.ScaleWidth, srcObject.ScaleHeight, depth
Next j
Next i
End Sub
Private Sub Form_Load()
MyAlphaBlend Picture1, Picture2, 4, 4, 100
End Sub
I hope this helps someone looking for a nice background effect. especially if you want to blend a background color of the picture1 (area) with picture2 (tile).
I recently posted a request for help on this matter but while waiting for a response I managed to come up with the solution and here it is.
CONTROLS USED:
Form1
SSPanel1
inside SSPanel1 are:
Picture1 sized to SSPanel1
Picture2 inside Picture1 to tile on Picture1
SOURCE CODE USED:
This code is only for those users who run Win98.
The Alphablending.dll file can be located by searching at yahoo... Simply type: Alphablending.dll and you'll see the search result.
Andrew G.
Option Explicit
Private Declare Function AlphaBlending Lib "Alphablending.dll" (ByVal destHDC As Long, ByVal XDest As Long, ByVal YDest As Long, ByVal destWidth As Long, ByVal destHeight As Long, ByVal srcHDC As Long, ByVal XSrc As Long, ByVal YSrc As Long, ByVal srcWidth As Long, ByVal srcHeight As Long, ByVal AlphaSource As Long) As Long
Private Sub MyAlphaBlend(destObject As PictureBox, srcObject As PictureBox, rows As Integer, col As Integer, depth As Long)
Dim i, j As Integer
Dim myheight, mywidth As Variant 'Width and Height.
'
'Get Picture1.Height, store it in variable 'myheight'.
myheight = srcObject.Height
'
'Get Picture1.Width, store it in variable 'mywidth'.
mywidth = srcObject.Width
'
'Use a nested 'For Loop' to create 8 across, 8 down.
For i = 0 To rows
For j = 0 To col
AlphaBlending destObject.hDC, (i * mywidth), (j * myheight), srcObject.ScaleWidth, srcObject.ScaleHeight, srcObject.hDC, 0, 0, srcObject.ScaleWidth, srcObject.ScaleHeight, depth
Next j
Next i
End Sub
Private Sub Form_Load()
MyAlphaBlend Picture1, Picture2, 4, 4, 100
End Sub
I hope this helps someone looking for a nice background effect. especially if you want to blend a background color of the picture1 (area) with picture2 (tile).