Results 1 to 6 of 6

Thread: Texturing Forms

  1. #1
    anoop007
    Guest

    Texturing Forms

    Can anyone give me insights on how to make a texture for a form? Like the way they do in Real JukeBox

  2. #2
    Registered User Olly's Avatar
    Join Date
    Apr 2001
    Location
    Switzerland
    Posts
    252
    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.

  3. #3
    anoop007
    Guest
    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?

  4. #4
    Megatron
    Guest
    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

  5. #5
    anoop007
    Guest
    perfect!!

    thanks

  6. #6
    Megatron
    Guest
    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
  •  



Click Here to Expand Forum to Full Width