PDA

Click to See Complete Forum and Search --> : Texturing Forms


anoop007
Apr 29th, 2001, 07:57 AM
Can anyone give me insights on how to make a texture for a form? Like the way they do in Real JukeBox

Olly
Apr 29th, 2001, 08:10 AM
have a look onto
http://www.vbaccelerator.com/codelib/gfx/skin.htm, there's an example prog of how to skin a form

anoop007
Apr 30th, 2001, 06:55 AM
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?

Megatron
Apr 30th, 2001, 04:45 PM
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

anoop007
May 1st, 2001, 07:00 PM
perfect!!

thanks

Megatron
May 2nd, 2001, 04:55 PM
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)