Private Declare Function CreateRoundRectRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long) As Long Private Declare Function SetWindowRgn Lib "user32" (ByVal hwnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long Private Sub MDIForm_Load() Dim mChildFormRegion As Long Dim retValue As LongmChildFormRegion = CreateRoundRectRgn(0, 0, 5000, 500, 500, 110) SetWindowRgn Me.hwnd, mChildFormRegion, False End Sub
Private Declare Function SetWindowRgn Lib "user32" (ByVal hwnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Private Sub MDIForm_Load()
Dim mChildFormRegion As Long
Dim retValue As LongmChildFormRegion = CreateRoundRectRgn(0, 0, 5000, 500, 500, 110)
SetWindowRgn Me.hwnd, mChildFormRegion, False
End Sub
如果能把vb界面修改成xp系统界面更好
其实,午夜中标准的写法应该这样
mChildFormRegion = CreateRoundRectRgn(0, 0, Me.Width / Screen.TwipsPerPixelX, Me.Height / Screen.TwipsPerPixelY, 20, 20)
http://community.csdn.net/Expert/topic/3387/3387552.xml?temp=.4152796