|
-
Apr 29th, 2001, 07:57 AM
#1
Texturing Forms
Can anyone give me insights on how to make a texture for a form? Like the way they do in Real JukeBox
-
Apr 29th, 2001, 08:10 AM
#2
Registered User
have a look onto
http://www.vbaccelerator.com/codelib/gfx/skin.htm, there's an example prog of how to skin a form
Last edited by Olly; Apr 29th, 2001 at 08:14 AM.
-
Apr 30th, 2001, 06:55 AM
#3
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?
-
Apr 30th, 2001, 04:45 PM
#4
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
-
May 1st, 2001, 07:00 PM
#5
-
May 2nd, 2001, 04:55 PM
#6
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)
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
|