computer 版 (精华区)

发信人: windoe (为中国电信做贡献), 信区: program
标  题: VB:讨厌了千编一律的矩形窗体,如何建立一个不规则形
发信站: 听涛站 (Fri Mar 10 19:09:12 2000), 转信

Windows API函数SetWindowRgn会让你得到满意的答复,下面的程序显示一个椭圆形的窗
体体,程序实现如下?
Private Declare Function CreateEllipticRgn Lib "gdi32" (ByVal X1 As Long, By
yVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVa
al hRgn As Long, ByVal bRedraw As Boolean) As Long
Private Sub Form_Load()
SetWindowRgn hWnd, CreateEllipticRgn(100, 100, 320, 200), True
Me.Show
Me.Show
End Sub


--By Kammi's SuperPost General Version
--

夜中不能寐,起坐弹鸣琴。
    薄帷鉴明月,清风吹我襟。
孤鸿号外野,翔鸟鸣北林。
    徘徊将何见,忧思独伤心。


[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:0.859毫秒