Thursday, April 4, 2013

Harvey balls (or a progress indicator)

For a continuous progress indicator with a custom design, a Rotator object. Of course based on a Canvas with custom drawing and a set of properties to set the look and the mode of the Rotator.  In design it basically is a Harvey ball.



The object is included in an example project, showing how the object is called and can be used.

Look in the code of the Paint event to see the drawing. As can be seen in the screenshot, the Canvas has no transparency on Windows in some cases (GDI+). If that is troubling for an application, the following code snippet can be uncommented:


    If Self.TrueWindow.HasBackColor Then
      g.ForeColor = Self.TrueWindow.BackColor
    Else
      g.ForeColor = FillColor
    End
    g.FillRect(0,0,g.Width,g.Height)
   
Look for it in (of course) the Paint event.

No comments:

Post a Comment