【VB技巧】VB屏幕融化代码 VB融化屏幕特效

  • A+
所属分类:lcx

    VB屏幕融化代码,VB屏幕融化,VB屏幕代码,VB 融化,VB融化代码,VB 屏幕 融化,VB融化屏幕特效,VB融化屏幕,VB融化特效,VB屏幕特效,VB屏幕特效,VB 融化 屏幕,VB 融化,VB GetWindowDC,VB GetDesktopWindow,VB CreateCompatibleBitmap,VB CreateCompatibleDC,VB SelectObject,VB BitBlt,VB SRCCOPY。

VB屏幕融化代码,VB融化屏幕特效:

Private Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function CreateCompatibleBitmap Lib "gdi32" (ByVal hdc As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
Private Declare Function CreateCompatibleDC Lib "gdi32" (ByVal hdc As Long) As Long
Private Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
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 Const SRCCOPY = &HCC0020                                                ' (DWORD) dest = source
Dim x As Integer, y As Integer
Dim Buffer As Long, hBitmap As Long, Desktop As Long, hScreen As Long, ScreenBuffer As Long
Private Declare Sub InvalidateRect Lib "user32" (ByVal hwnd As Long, lpRect As Any, ByVal bErase As Long)

Private Sub Form_Load()
    Me.Hide
    Desktop = GetWindowDC(GetDesktopWindow())
    hBitmap = CreateCompatibleDC(Desktop)
    hScreen = CreateCompatibleDC(Desktop)
    Buffer = CreateCompatibleBitmap(Desktop, 32, 32)
    ScreenBuffer = CreateCompatibleBitmap(Desktop, Screen.Width / 15, Screen.Height / 15)
    SelectObject hBitmap, Buffer
    SelectObject hScreen, ScreenBuffer
    BitBlt hScreen, 0, 0, Screen.Width / 15, Screen.Height / 15, Desktop, 0, 0, SRCCOPY
    For i = 0 To 1700000                                                        '融化的值
        y = (Screen.Height / 15) * Rnd
        x = (Screen.Width / 15) * Rnd
        BitBlt hBitmap, 0, 0, 32, 32, Desktop, x, y, SRCCOPY
        BitBlt Desktop, x + (1 - 2 * Rnd), y + (1 - 2 * Rnd), 32, 32, hBitmap, 0, 0, SRCCOPY
        DoEvents
    Next i
End Sub

文章来源于lcx.cc:【VB技巧】VB屏幕融化代码 VB融化屏幕特效

相关推荐: 关于手机隐私信息获取(期待行业人士破冰)-讨论贴

关于手机隐私信息获取(期待行业人士破冰)-讨论贴 啦绯哥 | 2013-11-27 15:38 自从用了智能手机后,很多应用安装时会提示获取手机号码、获取联系人、读取短信记录、获取设备信息等,这些信息到底是拿去干什么用的呢? 之前听小道消息说很多厂商变相收集这…

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: