Results 1 to 20 of 20

Thread: VB6 StarRating-Control (cairo-Rendering)

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,454

    VB6 StarRating-Control (cairo-Rendering)

    This is an implementation, based on Vector-Drawing (with the cairo-Wrapper-Classes from vbRichClient5).
    No (PNG- or other) Images were used - just plain Drawing-Commands (to gain more flexibility with regards to
    the Stars Shape - and to easier allow for different Base-Colors to fill the interior of the given Star-DrawingPath).

    A normal VB6-UserControl is used as the Host for these Drawings - fully transparent and alpha-aware.

    The Star-Rendering will be smooth and antialiased, even when the Controls are resized
    (to behave properly in DPI-aware Apps).

    The MinHeight of the Control is 16-, its MaxHeight 56-Pixels.

    The ScreenShot below shows, how the rendering behaves with different Sizes (and Colors).

    The Value of the Control can be set also per Mouse-Interaction (Drag- or Click) - and
    will (in Drag-Mode) show a darker "Hover-Overlay" (so the older Value can be seen for comparison,
    until the Mouse-Button is released).

    Here's the Source-Zip: StarRating2.zip
    (updated with a fix for: "Allow Zero-Detection whilst clicking outside the first Star")

    New version - (containing the fix above, but also a new modRC5Regfree.bas, which when included
    into a Project, will ensure regfree-loading of the RC5-Main-Classes automatically - when:
    - your App will run from a compiled Executable ... and
    - when a \Bin\-SubFolder exists below your App.Path, which contains copies of the 3 RC5 BaseDlls
    Version 3: StarRating3.zip

    And here a ScreenShot:



    Olaf
    Last edited by Schmidt; Sep 13th, 2015 at 03:52 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