Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Haven't you noticed how Windows has a tiled wallpa...
Author:
R.Shrivaths
E-mail:
Click to e-mail author
Website:
http://shrivaths.virtualave.net
Submitted:
5/15/2001
Version:
VB5
Compatibility:
VB5, VB6
Category:
Graphics
Views:
8165
Haven't you noticed how Windows has a tiled wallpaper and your VB application doesn't? Change that NOW!
Declarations:
Public 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 Public Const SRCCOPY = &HCC0020
Code:
Private Sub Form_Resize() 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
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement