VB Code:
Private Sub UserControl_Resize()
Dim intMinSize As Integer
UserControl.BackColor = UserControl.MaskColor
UserControl.FillColor = vbBlack
If UserControl.ScaleWidth <= UserControl.ScaleHeight Then
intMinSize = UserControl.ScaleWidth \ 2
Else
intMinSize = UserControl.ScaleHeight \ 2
End If
DrawArc UserControl.hdc, UserControl.ScaleWidth \ 2, UserControl.ScaleHeight \ 2, 0, 360, intMinSize
UserControl.FillColor = UserControl.MaskColor
DrawArc UserControl.hdc, UserControl.ScaleWidth \ 2, UserControl.ScaleHeight \ 2, 0, 360, intMinSize \ 2
Set UserControl.MaskPicture = UserControl.Image
UserControl.BackColor = vbRed
End Sub