VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This snippet allows your form to a tiled wallpaper just like Windows!

by R.Shrivaths (3 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Mon 3rd September 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This snippet allows your form to a tiled wallpaper just like Windows!

API Declarations


Public Const SRCCOPY = &HCC0020


Rate This snippet allows your form to a tiled wallpaper just like Windows!



ScaleWidth = Screen.Width
ScaleHeight = Screen.Height
Dim x As Integer
    Dim y As Integer
    Dim D As Integer
    Dim PatternHeight As Integer
    Dim PatternWidth As Integer
    Dim SM As Integer
    SM = ScaleMode          'save current value
    ScaleMode = 3           'pixel
    PatternHeight = 16
    PatternWidth = 16 'hard-coded value
    For x = 0 To ScaleWidth Step PatternWidth
        For y = 0 To ScaleHeight Step PatternHeight
            D = BitBlt(hDC, x, y, PatternWidth, PatternHeight, hDC, 0, 0, SRCCOPY)
        Next y
    Next x
    ScaleMode = SM          'reset to previous value

End Sub


Download this snippet    Add to My Saved Code

This snippet allows your form to a tiled wallpaper just like Windows! Comments

No comments have been posted about This snippet allows your form to a tiled wallpaper just like Windows!. Why not be the first to post a comment about This snippet allows your form to a tiled wallpaper just like Windows!.

Post your comment

Subject:
Message:
0/1000 characters