用windowsapi函式可以簡單實現你說的要求
這是我用過的:
private declare function animatewindow lib "user32" alias "animatewindow" (byval hwnd as intptr, byval dwtime as integer, byval dwflags as integer) as boolean
const aw_hor_positive as integer = 1 '視窗顯示動畫,自定義窗體出現方式
const aw_hor_negative as integer = 2
const aw_ver_positive as integer = 4
const aw_ver_negative as integer = 8
const aw_center as integer = 1
const aw_hide as integer = 65536
const aw_activate as integer = 131072
const aw_slide as integer = 262144
const aw_blend as integer = 524288 '視窗顯示動畫,自定義窗體出現方式
函式呼叫比如:
animatewindow(me.handle, 1500, aw_hor_negative or aw_slide)
QT實現螢幕滑動效果窗體
class cscrollscreenview public qgraphicsview 設定滾動的距離,單位 畫素 void setscrolldist intdist 在父窗體上按場景位置顯示試圖 virtual void showview private intm animationdurat...
窗體漸變效果
using system.runtime.interopservices dllimport user32.dll private static extern bool animatewindow int hwnd,int dwtime,int dwflags private const int a...
VB挖空窗體,實現懸浮控制項效果
大家有興趣的可以試試,希望對你們有幫助 使用三個api函式,簡單地說,把窗體裡面所有部分都變成紅色,然後去掉所有的紅色部分,直接複製貼上可以執行,看看神奇效果吧 option explicit private declare function getwindowlong lib user32 ali...