반응형
' 선언부
' ### 폼 원형으로 설정
Private Declare Function CreateEllipticRgn Lib "gdi32.dll" ( _
ByVal X1 As Long, _
ByVal Y1 As Long, _
ByVal X2 As Long, _
ByVal Y2 As Long _
) As Long
Private Declare Function SetWindowRgn Lib "user32.dll" ( _
ByVal hWnd As Long, _
ByVal hRgn As Long, _
ByVal bRedraw As Boolean _
) As Long
Private Declare Function DeleteObject Lib "gdi32.dll" ( _
ByVal hObject As Long _
) As Long
' 사용시
' ### 폼 원형으로 설정
Private Declare Function CreateEllipticRgn Lib "gdi32.dll" ( _
ByVal X1 As Long, _
ByVal Y1 As Long, _
ByVal X2 As Long, _
ByVal Y2 As Long _
) As Long
Private Declare Function SetWindowRgn Lib "user32.dll" ( _
ByVal hWnd As Long, _
ByVal hRgn As Long, _
ByVal bRedraw As Boolean _
) As Long
Private Declare Function DeleteObject Lib "gdi32.dll" ( _
ByVal hObject As Long _
) As Long
' 사용시
' ### 폼을 둥글게 설정한다.
Dim hRgn As Long
hRgn = CreateEllipticRgn(0, 0, ScaleX(Me.Width, vbTwips, vbPixels), ScaleY(Me.Height, vbTwips, vbPixels))
SetWindowRgn hWnd, hRgn, False
DeleteObject hRgn
Dim hRgn As Long
hRgn = CreateEllipticRgn(0, 0, ScaleX(Me.Width, vbTwips, vbPixels), ScaleY(Me.Height, vbTwips, vbPixels))
SetWindowRgn hWnd, hRgn, False
DeleteObject hRgn
반응형
'DEV > VB' 카테고리의 다른 글
Visual Basic 현재 날짜 가져 오기 (2) | 2010.09.15 |
---|---|
VisualBasic ODBC를 이용한 DB접속 (0) | 2010.04.08 |
VisualBasic 파일 입출력 (0) | 2010.04.08 |
VisualBasic 폼의 투명도 설정하기 (0) | 2010.04.08 |
윈도우 마우스 포인트 좌표 가져오기 (0) | 2010.04.08 |