You can make a beautiful gauge by combining two MicroHelp controls.Place a Mh3d control onto your form and set the inner bevel just insideof the outer bevel. Place a Mh3dCommand as a child of the Mh3d controlwith it’s top, left , and bottom just inside of the inner bevel of theMh3d control and its .Width set to 0. Set the .Picture property of theMh3dCommand to WINLOGO.BMP, set the .WallPaper property to 2 – Replicate,set the .FontStyle property to 3 – Lowered, and set the .Alignment propertyto 2 – Center. Now add this function to a global module:
Sub SetGauge (Ctrl1 As MhThreed, _ Ctrl2 As Mh3dCommand, percent As Integer) MaxWidth = Ctrl1.Width - (Ctrl2.Left * 2) Ctrl2.Width = MaxWidth * percent / 100 Ctrl2.Caption = Str$(percent) + "%" End Sub
You can call this function to set the % fill on the gauge fromanywhere. The end effect is a gauge that appears to be engraved in marble.You can use your own bitmaps for other textures such as wood and granite.