Win32API有很多讓你意想不到的功能。要創建特殊的不規則窗口看上去似乎很難。但我們如果我們說我們用幾行代碼就可以實現,這似乎不可思議。但事實就是如此!請試試:
PrivateDeclareFunctionCreateEllipticRgnLib"gdi32"(ByValX1AsLong,ByValY1AsLong,ByValX2AsLong,ByValY2AsLong)AsLong
PrivateDeclareFunctionSetWindowRgnLib"user32"(ByValhWndAsLong,ByValhRgnAsLong,ByValbRedrawAsBoolean)AsLong
PrivateSubForm_Load()
Show'Theform!
SetWindowRgnhWnd,CreateEllipticRgn(0,0,300,200),True
EndSub
上述代碼可以創建一個橢圓形狀的窗口。怎麼樣?->