1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Private Declare Function SetWindowRgn Lib "user32" _
(ByVal hWnd As Long, ByVal hRgn As Long, _
ByVal bRedraw As Boolean) As Long
Private Declare Function CreateRectRgn Lib "gdi32" _
(ByVal X1 As Long, ByVal Y1 As Long, _
ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Sub Command2_Click()
aplat Command1
End Sub
Private Sub aplat(controle As Control)
Dim hRegion As Long
With controle
hRegion = CreateRectRgn(3, 3, .Width - 3, .Height - 3)
SetWindowRgn .hWnd, hRegion, True
End With
End Sub |
Partager