Results 1 to 2 of 2

Thread: VB6 (RC6) Slider-Widget with Auto-Vert/Horz-Switching

  1. #1

    Thread Starter
    Join Date
    Jun 2013

    VB6 (RC6) Slider-Widget with Auto-Vert/Horz-Switching

    Just a simple Demo, which shows an efficient Slider-Control implementation.
    (about 70 Lines of code in cwSlider).

    Also included is a Demonstration for "visual inheritance" (of cwSlider in cwSliderFish)... don't ask...

    Here's a ScreenShot:

    And here the Demo-Code for this initial version:

    Edit (a newer version v2 is available in the Link below):
    - fixed a few Rendering-glitches with higher Zoom-Factors
    - the cwSlider.cls is now able, to render the thumb from User-ImgResources as well (by setting a Widget.ImageKey)
    - placed a few more comments in the surrounding Demo-App

    Have fun,

    Last edited by Schmidt; Nov 27th, 2020 at 04:54 PM.

  2. #2
    Fanatic Member
    Join Date
    May 2014
    Kallithea Attikis, Greece

    Re: VB6 (RC6) Slider-Widget with Auto-Vert/Horz-Switching

    I made some changes, because your very good example, draw both fish and arrow:

    At cwSlidder:
    Public NoArrow As Boolean
    In same class at W_Paint:
    If Not NoArrow Then Cairo.Theme.DrawTo CC, W, thmTypeArrow, IIf(W.Focused, thmStateHovered, 0), xV - 6, 0, 13, 7, 0, thmDirectionDown
    At cwSliderFish, we place the S.NoArrow=True, so now we didn't get the arrow behind the image of fish (or any other)
    Private Sub Class_Initialize()
      Set S = New cwSlider  'create a new (normal) cwSlider-instance
      S.NoArrow = True
      Set W = S.Widget 'now override our internal WidgetBase with it
    End Sub

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