Can anyone give me insights on how to make a texture for a form? Like the way they do in Real JukeBox
Printable View
Can anyone give me insights on how to make a texture for a form? Like the way they do in Real JukeBox
have a look onto
http://www.vbaccelerator.com/codelib/gfx/skin.htm, there's an example prog of how to skin a form
yes i knew that.. but that was not what i meant..
anyways .. thanks
ok i've got an idea on how to do this..
anyone knows how to tile a background image on the form?
Code: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 Sub Form_Activate()
AutoRedraw = True
Picture1.AutoRedraw = True
For x = 1 To Width Step Picture1.Width / Screen.TwipsPerPixelX
For y = 1 To Height Step Picture1.Height / Screen.TwipsPerPixelY
BitBlt hDC, x, y, Picture1.Width / Screen.TwipsPerPixelX, Picture1.Height / Screen.TwipsPerPixelY, Picture1.hDC, 0, 0, vbSrcCopy
Next y
Next x
End Sub
perfect!!
thanks
Your Welcome :)
Also, notice that I did not convert the width and height of the Form to pixels. This is because twips is smaller, thus when you resize the window, it will still be textured. (and it will save you from repainting every time you resize)