A percfect Circle Command Button!!!

Hello: I need to find a control that have a circle button that can suppor pictures and 3d effects.  I alredy used sheridan sscommand button but it does not have a perfect circle button, it works with a image shape.
 Thanks in advance for your help.
Humberto Quevedo
Guadalajara Mexico
al662994Asked:
Who is Participating?
 
MirkwoodConnect With a Mentor Commented:
Make it yourself... here is a start for a round user control..

Option Explicit
Private Declare Function CreateEllipticRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long


Private Declare Function CreatePolygonRgn Lib "gdi32" (lpPoint As POINTAPI, ByVal nCount As Long, ByVal nPolyFillMode As Long) As Long
Private Type POINTAPI
        x As Long
        y As Long
End Type

Private Declare Function SetWindowRgn Lib "user32" _
        (ByVal hWnd As Long, ByVal hRgn As Long, _
        ByVal bRedraw As Boolean) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long

Dim hRegion As Long

Public Property Get BackColor() As OLE_COLOR
    BackColor = UserControl.BackColor
End Property

Public Property Let BackColor(ByVal newvalue As OLE_COLOR)
    UserControl.BackColor = newvalue
End Property


Private Sub UserControl_Click()
    'Display name
    MsgBox Ambient.DisplayName
End Sub


Private Sub UserControl_Resize()
        'Make square
        If (Width > Height) Then Width = Height
        If (Height > Width) Then Height = Width
         
                 
        'Delete region
        If (hRegion <> 0) Then DeleteObject hRegion
        hRegion = CreateEllipticRgn(ScaleLeft / Screen.TwipsPerPixelX, ScaleTop / Screen.TwipsPerPixelY, (ScaleLeft + ScaleWidth) / Screen.TwipsPerPixelX, (ScaleTop + ScaleHeight) / Screen.TwipsPerPixelY)
        'Make region active region
        SetWindowRgn hWnd, hRegion, True
End Sub

Private Sub UserControl_Terminate()
        'Destroy region
        If (hRegion <> 0) Then DeleteObject hRegion
        hRegion = 0
End Sub

Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
    BackColor = PropBag.ReadProperty("BackColor", &H8080FF)
End Sub

Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
    PropBag.WriteProperty "BackColor", BackColor, &H8080FF
End Sub
0
 
MindoCommented:
I haven't found any decent and nice free ActiveX button control. I'm working on a project that uses touch screens to communicate with our software. So we needed stylish controls for our project. We haven't found anything decent. We have written a button for ourselves. Just create an ActiveX control by inheriting it from the standard BUTTON control and draw a nice circle or load an image from the OnDraw() function. It will take a week or so and you will have a button control.
0
All Courses

From novice to tech pro — start learning today.