Results 1 to 40 of 4199

Thread: CommonControls (Replacement of the MS common controls)

Threaded View

  1. #11
    Fanatic Member
    Join Date
    Apr 2015
    Posts
    536

    Re: CommonControls (Replacement of the MS common controls)

    Quote Originally Posted by Krool View Post
    It's difficult to have no border as it's back always when the control size has been changed.
    Yes, I experienced this too.
    Solution seems to be simple:

    Code:
    Public Property Let VisualStyles(ByVal Value As Boolean)
    PropVisualStyles = Value
    If ProgressBarHandle <> 0 And EnabledVisualStyles() = True Then
        Dim dwExStyle As Long, dwExStyleOld As Long
        dwExStyle = GetWindowLong(hWnd, GWL_EXSTYLE)
        dwExStyleOld = dwExStyle
        If PropVisualStyles = True Then
            ActivateVisualStyles ProgressBarHandle
            If (dwExStyle And WS_EX_STATICEDGE) = WS_EX_STATICEDGE Then dwExStyle = dwExStyle And Not WS_EX_STATICEDGE
        Else
            RemoveVisualStyles ProgressBarHandle
            If Not (dwExStyle And WS_EX_STATICEDGE) = WS_EX_STATICEDGE Then
                dwExStyle = dwExStyle And Not WS_EX_STATICEDGE
            End If
        End If
        'If dwExStyle <> dwExStyleOld Then
        SetWindowLong ProgressBarHandle, GWL_EXSTYLE, dwExStyle
        Call ComCtlsFrameChanged(ProgressBarHandle)
        'End If
        Me.Refresh
    End If
    UserControl.PropertyChanged "VisualStyles"
    End Property
    EDIT:
    This is also the place where a Border property could snap to.
    Last edited by Karl77; Dec 2nd, 2016 at 12:46 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width