dcsimg
Results 1 to 21 of 21

Thread: [RESOLVED] How to develop a border smooth(anti-aliased) rounded-rect button user control?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2012
    Posts
    1,663

    Resolved [RESOLVED] How to develop a border smooth(anti-aliased) rounded-rect button user control?

    I know that RC5.Cairo, GDIPlus and GDI can draw smooth (anti-aliased) rounded rectangles in a Form or PictureBox. However, I don't know how to develop a rounded-rect button control with a smooth (anti-aliased) corner?

    Any advice and suggestions would be greatly appreciated.
    Attached Images Attached Images   
    Last edited by dreammanor; Apr 9th, 2018 at 07:52 AM.

  2. #2

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2012
    Posts
    1,663

    Re: How to develop a border smooth(anti-aliased) rounded-rect button user control?

    Quote Originally Posted by The trick View Post
    Hi The trick, I studied your controls which are wonderful, but they don't seem to have special handling of the rounded-corners.
    Attached Images Attached Images  
    Last edited by dreammanor; Apr 9th, 2018 at 09:40 AM.

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,659

    Re: How to develop a border smooth(anti-aliased) rounded-rect button user control?

    Recent threads have covered everything required: transparent UserControls and GDI antialiasing. If that isn't good enough then you could use GDI+ antialiasing.

    The question is why?

    All you do is guarantee that your programs look and act foreign on every version of Windows. You also have the problem of everything falling apart entirely when a user has one of the Accessibility Themes selected.

    Programs shouldn't look like some 1990s web site full of random spinning flaming animated GIFs, mismatched fonts and garish colors.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2012
    Posts
    1,663

    Re: How to develop a border smooth(anti-aliased) rounded-rect button user control?

    Quote Originally Posted by dilettante View Post
    Recent threads have covered everything required: transparent UserControls and GDI antialiasing. If that isn't good enough then you could use GDI+ antialiasing.

    The question is why?
    Hi dilettante, I studied your "AA GDI Drawing" and Olaf's "Aqua-Button", but I didn't see a thread that made the four corners of the button control transparent. I'll continue to search for relevant information in vbForums tomorrow. Thank you.


    Quote Originally Posted by dilettante View Post
    You also have the problem of everything falling apart entirely when a user has one of the Accessibility Themes selected.
    I still don't understand the meaning of this sentence.

    Quote Originally Posted by dilettante View Post
    Programs shouldn't look like some 1990s web site full of random spinning flaming animated GIFs, mismatched fonts and garish colors.
    Completely agree with you. I also like the clean, flat GUI, just like the button controls I showed on #1.
    Last edited by dreammanor; Apr 9th, 2018 at 11:02 AM.

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2012
    Posts
    1,663

    Re: How to develop a border smooth(anti-aliased) rounded-rect button user control?

    I need a button control similar to this green button.
    Attached Images Attached Images  

  7. #7

  8. #8
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,659

    Re: How to develop a border smooth(anti-aliased) rounded-rect button user control?

    Well if you need your button to appear over anything but a solid-color background you can't use mask transparency.

    If you want to use alpha transparency you might have to go through a lot of gymnastics to created an anti-aliased premultipled alpha image using GDI so that you can render via AlphaBlend().

    So you are probably going to have to render your button shape using GDI+ and then render it during the UserControl's Paint event using GDI+ as well. You could still get away with AlphaBlend() but for that you need to convert the GDI+ Image to a premultiplied alpha GDI Bitmap.


    So maybe LaVolpe or somebody will chime in. But there have been a lot of GDI+ threads here lately so you may already find the pieces and parts you need described in one of them. If not it is just a matter of cracking open the GDI+ Flat API documentation and working out the details.


    How did programmers with inadequate documentation consumption skills even get by in the days before globally accessible forum sites? Back when I was hiring programmers in the 1980s-1990s we always required passing a reading test based on a "how to" question and a stack of reference manuals. Now we even have search engines.

    Even the MSDN Library documentation has decent search capabilities. Do people even know about the search expressions accepting quoted strings, AND, OR, NOT, NEAR, wildcards, etc? Or the "Match similar words" checkbox? It isn't Google, but it is pretty good.

    Sadly the GDI+ Flat API isn't covered in any detail even in the October 2001 edition, the best one for VB6 programmers. It was still sort of "too new."

  9. #9
    Hyperactive Member
    Join Date
    Aug 2016
    Posts
    371

    Re: How to develop a border smooth(anti-aliased) rounded-rect button user control?

    Quote Originally Posted by dilettante View Post
    Well if you need your button to appear over anything but a solid-color background you can't use mask transparency.

    If you want to use alpha transparency you might have to go through a lot of gymnastics to created an anti-aliased premultipled alpha image using GDI so that you can render via AlphaBlend().

    So you are probably going to have to render your button shape using GDI+ and then render it during the UserControl's Paint event using GDI+ as well. You could still get away with AlphaBlend() but for that you need to convert the GDI+ Image to a premultiplied alpha GDI Bitmap.


    So maybe LaVolpe or somebody will chime in. But there have been a lot of GDI+ threads here lately so you may already find the pieces and parts you need described in one of them. If not it is just a matter of cracking open the GDI+ Flat API documentation and working out the details.


    How did programmers with inadequate documentation consumption skills even get by in the days before globally accessible forum sites? Back when I was hiring programmers in the 1980s-1990s we always required passing a reading test based on a "how to" question and a stack of reference manuals. Now we even have search engines.

    Even the MSDN Library documentation has decent search capabilities. Do people even know about the search expressions accepting quoted strings, AND, OR, NOT, NEAR, wildcards, etc? Or the "Match similar words" checkbox? It isn't Google, but it is pretty good.

    Sadly the GDI+ Flat API isn't covered in any detail even in the October 2001 edition, the best one for VB6 programmers. It was still sort of "too new."

    Name:  Esferas.png
Views: 791
Size:  83.3 KB



    http://leandroascierto.com/blog/esferas-con-gdi/

    https://www.mediafire.com/file/n6b50...uttonMetro.zip
    Last edited by xxdoc123; Apr 10th, 2018 at 12:33 AM.

  10. #10
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,659

    Re: How to develop a border smooth(anti-aliased) rounded-rect button user control?

    I always forget about OleTranslateColor() and end up rolling my own based on GetSysColor() instead. Thanks for the reminder.

  11. #11

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2012
    Posts
    1,663

    Re: How to develop a border smooth(anti-aliased) rounded-rect button user control?

    Hi @xxdoc123, thank you for your information, the graphics drawn by GDIPlus are very beautiful. RC5.Cairo can also draw very beautiful graphics. However, these examples only draw the picture of a rounded button and can't make a real rounded button control. Because the button control is a rectangle window, I need to make the four corners of the window transparent.

    http://www.vbforums.com/showthread.p...=1#post5254827
    Last edited by dreammanor; Apr 10th, 2018 at 12:43 AM.

  12. #12
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,659

    Re: How to develop a border smooth(anti-aliased) rounded-rect button user control?

    Maybe the code used here could help you:

    A class for creating round rectangles in GDI+ with pixel accurate symmetry

    Since rounded rectangles are not a native shape to GDI+, they are typically created using a GraphicsPath or some other mechanism. It doesn’t matter if you use AddArc, AddBezeir, Polygon points, Transformations etc., the asymmetry is there if any of the previously stated conditions are true. The reason none of these methods produce accurate results is because the problem is not in the definition of the points. All the methods above will accurately define the points. The problem occurs when the shape is rendered (drawn or filled). I won’t speculate on what the underlying cause of this asymmetry is.

  13. #13

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2012
    Posts
    1,663

    Re: How to develop a border smooth(anti-aliased) rounded-rect button user control?

    Quote Originally Posted by dilettante View Post
    Well if you need your button to appear over anything but a solid-color background you can't use mask transparency.

    If you want to use alpha transparency you might have to go through a lot of gymnastics to created an anti-aliased premultipled alpha image using GDI so that you can render via AlphaBlend().

    So you are probably going to have to render your button shape using GDI+ and then render it during the UserControl's Paint event using GDI+ as well. You could still get away with AlphaBlend() but for that you need to convert the GDI+ Image to a premultiplied alpha GDI Bitmap.


    So maybe LaVolpe or somebody will chime in. But there have been a lot of GDI+ threads here lately so you may already find the pieces and parts you need described in one of them. If not it is just a matter of cracking open the GDI+ Flat API documentation and working out the details.
    I don't need Alpha, I just need to make the four corners of the rounded button control transparent.

    Quote Originally Posted by dilettante View Post
    How did programmers with inadequate documentation consumption skills even get by in the days before globally accessible forum sites? Back when I was hiring programmers in the 1980s-1990s we always required passing a reading test based on a "how to" question and a stack of reference manuals. Now we even have search engines.

    Even the MSDN Library documentation has decent search capabilities. Do people even know about the search expressions accepting quoted strings, AND, OR, NOT, NEAR, wildcards, etc? Or the "Match similar words" checkbox? It isn't Google, but it is pretty good.

    Sadly the GDI+ Flat API isn't covered in any detail even in the October 2001 edition, the best one for VB6 programmers. It was still sort of "too new."
    Reading documents is one of the ways to solve the problem, but VB6 is a product that has been abandoned by Microsoft for almost 20 years, and many documents are obsolete, incomplete or even wrong. When I just graduated, I read a lot of VB6 English reference manuals, but now I don't. For me, reading code is the quickest way, even faster than reading Chinese documents (although my Chinese is excellent).

    Many times, when I ask a question, I don't necessarily want to get the final answer. I hope to learn about different ideas and different solutions by discussing these questions so that I and others can learn a lot of knowledge, and more importantly, I can communicate with others.

    In fact, 12 years ago, I knew how to make the four corners of the rounded button control transparent, but the method I was using was very complicated and I hope that others can have a more professional and simple method.

    If I can't find a professional and easy way, I'll use a stupid and simple method to hide the four corners of a rounded button control by setting the button backcolor to match the container backcolor. But if the container background is a picture (not monochrome) then my simple method will be ineffective.

  14. #14

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2012
    Posts
    1,663

    Re: How to develop a border smooth(anti-aliased) rounded-rect button user control?

    Quote Originally Posted by dilettante View Post
    Very useful information, thank you dilettante.

  15. #15
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,659

    Re: How to develop a border smooth(anti-aliased) rounded-rect button user control?

    If you only need something simple (no alpha transparency or alpha anti-aliasing) here is an idea:

    Name:  sshot.png
Views: 810
Size:  3.0 KB

    You can extract the few parts needed from the Drawing class used here and embed them into your UserControl, or discard most of it and use a hidden PictureBox as your canvas for drawing the large image to StretchBlt down to size with halftone mode.
    Attached Files Attached Files

  16. #16

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2012
    Posts
    1,663

    Re: How to develop a border smooth(anti-aliased) rounded-rect button user control?

    Sorry, I didn't express my meaning clearly. I want a simple rounded button whose border is smooth (anti-aliased), which means that the border is alpha anti-aliased. Still thank you very much for your wonderful code, dilettante.
    Last edited by dreammanor; Apr 10th, 2018 at 06:55 AM.

  17. #17

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2012
    Posts
    1,663

    Re: How to develop a border smooth(anti-aliased) rounded-rect button user control?

    Quote Originally Posted by The trick View Post
    dreammanor, sorry i thought you can use a predefined picture to make the button like that:


    Anyway, you can use standard graphical buttons and process WM_CTLCOLORBTN, or use windowless control. To draw a rounded rectangle you can use either GDI+ paths or draw rectangle and two/four circles.
    Hi The trick, thanks for your suggestion. I learned a lot from your code. Thank you so much.

  18. #18
    Frenzied Member
    Join Date
    Feb 2015
    Posts
    1,362

    Re: How to develop a border smooth(anti-aliased) rounded-rect button user control?

    As the first step (hastily no tested/error checking/and other things like no properties etc.):
    Code:
    Option Explicit
    
    Private Const SmoothingModeAntiAlias    As Long = 4
    Private Const CombineModeReplace        As Long = 0
    Private Const CombineModeXor            As Long = 3
    Private Const CombineModeExclude        As Long = 4
    
    Private Type GdiplusStartupInput
        GdiplusVersion              As Long
        DebugEventCallback          As Long
        SuppressBackgroundThread    As Long
        SuppressExternalCodecs      As Long
    End Type
    
    Private Declare Function GdiplusStartup Lib "gdiplus" ( _
                             ByRef token As Long, _
                             ByRef inputbuf As GdiplusStartupInput, _
                             Optional ByVal outputbuf As Long = 0) As Long
    Private Declare Function GdipCreateFromHDC Lib "gdiplus" ( _
                             ByVal hdc As Long, _
                             ByRef graphics As Long) As Long
    Private Declare Function GdipDeleteGraphics Lib "gdiplus" ( _
                             ByVal graphics As Long) As Long
    Private Declare Function GdiplusShutdown Lib "gdiplus" ( _
                             ByVal token As Long) As Long
    Private Declare Function GdipFillEllipse Lib "gdiplus" ( _
                             ByVal graphics As Long, _
                             ByVal brush As Long, _
                             ByVal x As Single, _
                             ByVal y As Single, _
                             ByVal Width As Single, _
                             ByVal Height As Single) As Long
    Private Declare Function GdipSetSmoothingMode Lib "gdiplus" ( _
                             ByVal graphics As Long, _
                             ByVal SmoothingMd As Long) As Long
    Private Declare Function GdipCreateSolidFill Lib "gdiplus" ( _
                             ByVal argb As Long, _
                             ByRef brush As Long) As Long
    Private Declare Function GdipDeleteBrush Lib "gdiplus" ( _
                             ByVal brush As Long) As Long
    Private Declare Function GdipSetSolidFillColor Lib "gdiplus" ( _
                             ByVal brush As Long, _
                             ByVal argb As Long) As Long
    Private Declare Function GdipDrawEllipse Lib "gdiplus" ( _
                             ByVal graphics As Long, _
                             ByVal pen As Long, _
                             ByVal x As Single, _
                             ByVal y As Single, _
                             ByVal Width As Single, _
                             ByVal Height As Single) As Long
    Private Declare Function GdipFillRectangle Lib "gdiplus" ( _
                             ByVal graphics As Long, _
                             ByVal brush As Long, _
                             ByVal x As Single, _
                             ByVal y As Single, _
                             ByVal Width As Single, _
                             ByVal Height As Single) As Long
    Private Declare Function GdipSetClipRect Lib "gdiplus" ( _
                             ByVal graphics As Long, _
                             ByVal x As Single, _
                             ByVal y As Single, _
                             ByVal Width As Single, _
                             ByVal Height As Single, _
                             ByVal CombineMd As Long) As Long
    
    Private mbIsPressed As Boolean
    Private mhToken     As Long
    Private mhBrush     As Long
    
    Private Sub UserControl_HitTest( _
                ByRef x As Single, _
                ByRef y As Single, _
                ByRef HitResult As Integer)
        Dim fRadius As Single
        
        If UserControl.ScaleWidth > UserControl.ScaleHeight Then
            fRadius = UserControl.ScaleHeight - 1
        Else
            fRadius = UserControl.ScaleWidth - 1
        End If
        
        If x > fRadius / 2 And x < UserControl.ScaleWidth - fRadius / 2 Then
            HitResult = vbHitResultHit
        Else
            
            y = y - fRadius / 2
            
            If x < fRadius / 2 Then
                x = x - fRadius / 2
            Else
                x = x - (UserControl.ScaleWidth - fRadius / 2)
            End If
            
            If Sqr(x ^ 2 + y ^ 2) > fRadius / 2 Then
                HitResult = vbHitResultOutside
            Else
                HitResult = vbHitResultHit
            End If
        End If
        
    End Sub
    
    Private Sub UserControl_Initialize()
        Dim tGpInput    As GdiplusStartupInput
        
        tGpInput.GdiplusVersion = 1
        
        If GdiplusStartup(mhToken, tGpInput) Then
            MsgBox "Unable to init GDI+"
            Exit Sub
        End If
        
        GdipCreateSolidFill &HFF00FF00, mhBrush
        
    End Sub
    
    Private Sub UserControl_Resize()
        UserControl.Refresh
    End Sub
    
    Private Sub UserControl_Terminate()
    
        If mhBrush Then
            GdipDeleteBrush mhBrush
        End If
        
        If mhToken Then
            GdiplusShutdown mhToken
        End If
        
    End Sub
    
    Private Sub UserControl_MouseDown( _
                ByRef Button As Integer, _
                ByRef Shift As Integer, _
                ByRef x As Single, _
                ByRef y As Single)
                
        mbIsPressed = True
        UserControl.Refresh
        
    End Sub
    
    Private Sub UserControl_MouseUp( _
                ByRef Button As Integer, _
                ByRef Shift As Integer, _
                ByRef x As Single, _
                ByRef y As Single)
                
        mbIsPressed = False
        UserControl.Refresh
        
    End Sub
    
    Private Sub UserControl_Paint()
        Dim hGr         As Long
        Dim fRadius     As Single
        Dim lColor      As Long
        Dim lWidth      As Long
        Dim lHeight     As Long
        Dim sCaption    As String
        
        If mhToken = 0 Then Exit Sub
        
        If GdipCreateFromHDC(UserControl.hdc, hGr) Then Exit Sub
            
        GdipSetSmoothingMode hGr, SmoothingModeAntiAlias
        
        If UserControl.ScaleWidth > UserControl.ScaleHeight Then
            fRadius = UserControl.ScaleHeight - 1
        Else
            fRadius = UserControl.ScaleWidth - 1
        End If
        
        If mbIsPressed Then
            lColor = &H8F0000FF
        Else
            lColor = &H8F00FF00
        End If
        
        GdipSetSolidFillColor mhBrush, lColor
        
        GdipSetClipRect hGr, fRadius / 2, 0, UserControl.ScaleWidth - fRadius / 2, UserControl.ScaleHeight, CombineModeExclude
        GdipFillEllipse hGr, mhBrush, 0, 0, fRadius, fRadius
        
        GdipSetClipRect hGr, UserControl.ScaleWidth - fRadius / 2 - 1, 0, fRadius, UserControl.ScaleHeight, CombineModeReplace
        GdipFillEllipse hGr, mhBrush, UserControl.ScaleWidth - fRadius - 1, 0, fRadius, fRadius
        
        GdipSetClipRect hGr, fRadius / 2, 0, UserControl.ScaleWidth - fRadius - 1, UserControl.ScaleHeight, CombineModeReplace
        GdipFillRectangle hGr, mhBrush, fRadius / 2 - 1, 0, UserControl.ScaleWidth - fRadius, UserControl.ScaleHeight
        
        GdipDeleteGraphics hGr
        
        sCaption = "Button"
        
        lWidth = UserControl.TextWidth(sCaption)
        lHeight = UserControl.TextHeight(sCaption)
        
        UserControl.CurrentX = (UserControl.ScaleWidth - lWidth) / 2
        UserControl.CurrentY = (UserControl.ScaleHeight - lHeight) / 2
        
        UserControl.Print "Button"
        
    End Sub
    Attached Files Attached Files

  19. #19

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2012
    Posts
    1,663

    Re: [RESOLVED] How to develop a border smooth(anti-aliased) rounded-rect button user

    Hi The trick, it's fantastic. Extremely grateful.
    Last edited by dreammanor; Apr 10th, 2018 at 08:43 AM.

  20. #20
    Hyperactive Member
    Join Date
    Aug 2016
    Posts
    371

    Re: [RESOLVED] How to develop a border smooth(anti-aliased) rounded-rect button user

    Quote Originally Posted by dreammanor View Post
    Hi The trick, it's fantastic. Extremely grateful.
    Name:  捕获.JPG
Views: 829
Size:  17.9 KB

    Code:
    Option Explicit
    
    Dim penl As Long, brush As Long
    Private Declare Function GdipDrawArcI _
                   Lib "gdiplus" (ByVal graphics As Long, _
                                  ByVal pen As Long, _
                                  ByVal x As Long, _
                                  ByVal y As Long, _
                                  ByVal Width As Long, _
                                  ByVal Height As Long, _
                                  ByVal startAngle As Single, _
                                  ByVal sweepAngle As Single) As GpStatus
    
    Private Sub DrawRoundRectangle(graphics As Long, _
                                   brush As Long, _
                                   x As Long, _
                                   y As Long, _
                                   Width As Long, _
                                   Height As Long, _
                                   Optional RoundSize As Long = 30)
       ' GdipDrawArcI graphics, brush, x, y, RoundSize * 2, RoundSize * 2, 180, 90 '
        GdipFillPieI graphics, brush, x, y, RoundSize * 2, RoundSize * 2, 180, 90 ''
        
        ' GdipDrawLineI graphics, brush, x + RoundSize, y, x + Width - RoundSize, y ''
        GdipFillRectangleI graphics, brush, x + RoundSize - 1, y, Width - 2 * RoundSize + 2, RoundSize + 2 '
        
      '  GdipDrawArcI graphics, brush, x + Width - RoundSize * 2, y, RoundSize * 2, RoundSize * 2, 270, 90
        GdipFillPieI graphics, brush, x + Width - RoundSize * 2, y, RoundSize * 2, RoundSize * 2, 270, 90
        
         'GdipDrawLineI graphics, brush, x + Width, y + RoundSize, x + Width, y + Height - RoundSize
        GdipFillRectangleI graphics, brush, x, y + RoundSize - 1, Width, Height - 2 * RoundSize + 2
        
       ' GdipDrawArcI graphics, brush, x + Width - RoundSize * 2, y + Height - RoundSize * 2, RoundSize * 2, RoundSize * 2, 0, 90
        GdipFillPieI graphics, brush, x + Width - RoundSize * 2, y + Height - RoundSize * 2, RoundSize * 2, RoundSize * 2, 0, 90
        
       ' GdipDrawLineI graphics, brush, x + RoundSize, y + Height, x + Width - RoundSize, y + Height
        
        ' GdipDrawArcI graphics, brush, x, y + Height - RoundSize * 2, RoundSize * 2, RoundSize * 2, 90, 90
        GdipFillPieI graphics, brush, x, y + Height - RoundSize * 2, RoundSize * 2, RoundSize * 2, 90, 90
        
       ' GdipDrawLineI graphics, brush, x, y + RoundSize, x, y + Height - RoundSize
        GdipFillRectangleI graphics, brush, x + RoundSize - 1, y + Height - RoundSize - 2, Width - 2 * RoundSize + 2, RoundSize + 2
    End Sub
    
    Private Sub UserControl_Initialize()
        InitGDIPlus
    
    
    End Sub
    
    Private Sub UserControl_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
    UserControl.Refresh
    End Sub
    
    Private Sub UserControl_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
    UserControl.Refresh
    End Sub
    
    Private Sub UserControl_Paint()
    
        Dim sCaption As String
    
        Dim lWidth   As Long
    
        Dim lHeight  As Long
    
        Dim graphics As Long
    
        GdipCreateFromHDC UserControl.hDC, graphics
        GdipSetSmoothingMode graphics, SmoothingModeAntiAlias
        
        GdipCreateSolidFill &HFF00FF00, brush
        DrawRoundRectangle graphics, brush, 0, 0, UserControl.ScaleWidth, UserControl.ScaleHeight
        GdipDeleteGraphics graphics '
        sCaption = "Button"
        
        lWidth = UserControl.TextWidth(sCaption)
        lHeight = UserControl.TextHeight(sCaption)
        
        UserControl.CurrentX = (UserControl.ScaleWidth - lWidth) / 2
        UserControl.CurrentY = (UserControl.ScaleHeight - lHeight) / 2
        
        UserControl.Print "Button"
    
    End Sub
    
    Private Sub UserControl_Resize()
    
        UserControl.Refresh
    
    End Sub
    
    Private Sub UserControl_Terminate()
        'GdipDeletePen penl
    
        GdipDeleteBrush brush
       
        TerminateGDIPlus
    
    End Sub
    Attached Files Attached Files
    Last edited by xxdoc123; Apr 10th, 2018 at 11:14 PM.

  21. #21

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2012
    Posts
    1,663

    Re: [RESOLVED] How to develop a border smooth(anti-aliased) rounded-rect button user

    Thank you, xxdoc123. There is a small problem where the size of the rounded rectangle is inconsistent with the size of the control.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width