大家有興趣的可以試試,希望對你們有幫助
**使用三個api函式,簡單地說,把窗體裡面所有部分都變成紅色,然後去掉所有的紅色部分,**直接複製貼上可以執行,看看神奇效果吧
option explicit
private declare function getwindowlong lib "user32" alias "getwindowlonga" (byval hwnd as long, byval nindex as long) as long
private declare function setwindowlong lib "user32" alias "setwindowlonga" (byval hwnd as long, byval nindex as long, byval dwnewlong as long) as long
private declare function setlayeredwindowattributes lib "user32" (byval hwnd as long, byval crkey as long, byval balpha as byte, byval dwflags as long) as long
private const ws_ex_layered = &h80000
private const gwl_exstyle = (-20)
private const lwa_alpha = &h2
private const lwa_colorkey = &h1
private sub form_load()
' 掏空窗體
me.backcolor = &hff0000
dim rtn as long
dim borderstyler
borderstyler = 0
rtn = getwindowlong(hwnd, gwl_exstyle)
rtn = rtn or ws_ex_layered
setwindowlong hwnd, gwl_exstyle, rtn
setlayeredwindowattributes hwnd, &hff0000, 0, lwa_colorkey
end sub
vb 點選控制項移動窗體
新增模組 如下 public declare function sendmessage lib user32 alias sendmessagea byval hwnd as long,byval wmsg as long,byval wparam as long,lparam as any as ...
在VB中實現窗體的動態效果
在vb 中實現窗體的動態效果 在vb程式設計中,應用程式窗體的出現和關閉一般都是靜態的,不過,我們利用下面的乙個api函式animatewindow就可以輕鬆實現窗體的動態效果。api函式animatewindow的宣告如下 private declare function animatewindo...
vc 實現懸浮窗,迅雷360懸浮球效果
1.setwindowrgn建立圓角懸浮窗dlgfloat rgn.createroundrectrgn rect.left,rect.top,rect.width rect.height 13,13 m rgnwnd.deleteobject m rgnwnd.createrectrgn 0,0,...