[API]
RECT
FillRect

[DEFINE]
Public Enum DrawSignalStrength_Styles
  #If SignalStrengthControl_Create Then
    DSSS_Visible = &H10000000
    #End If
  #If DrawSignalStrength_Disabled Then
    DSSS_Disabled = &H8&
    #End If
  DSSS_Sunken = &H10&
  #If DrawSignalStrength_WhiteBackgrounds Then
    DSSS_WhiteBG = &H20&
    #End If
  #If SignalStrengthControl_HasIcons Then
    DSSS_NoIconCenter = &H40&
    DSSS_NoIconRight = &H80&
    #End If
  DSSS_Transparent = &H100&
  End Enum

[CODE]
Public Sub DrawSignalStrengthEx(ByVal hDC As Long, ByVal x As Long, ByVal y As Long, ByVal xStrength As Long, Optional ByVal xStyles As DrawSignalStrength_Styles)
  Dim xType1 As RECT
  Dim xLong1 As Long

  If Not hDC = 0& Then
    xType1.Left = x
    xType1.Right = x + 32&
    xType1.Top = y
    xType1.Bottom = y + 16&
    If (xStyles And CLng(DrawSignalStrength_Styles.DSSS_Transparent)) = 0& Then
      #If DrawSignalStrength_WhiteBackgrounds Then
        If (xStyles And CLng(DrawSignalStrength_Styles.DSSS_WhiteBG)) = 0& Then
          Call FillRect(hDC, xType1, 16&)
          Else
          Call FillRect(hDC, xType1, 6&)
          End If
        #Else
        Call FillRect(hDC, xType1, 16&)
        #End If
      End If

    For xLong1 = 0& To 4&
      xType1.Left = x + 2& + xLong1 * 6&
      xType1.Top = y + 12& - 3& * xLong1
      xType1.Right = xType1.Left + 4& + 1&
      If (xStyles And CLng(DrawSignalStrength_Styles.DSSS_Sunken)) = 0& Then
        Call FillRect(hDC, xType1, 17&)
        Else
        Call FillRect(hDC, xType1, 21&)
        End If
      xType1.Right = xType1.Right - 1&
      xType1.Bottom = y + 15&
      If (xStyles And CLng(DrawSignalStrength_Styles.DSSS_Sunken)) = 0& Then
        Call FillRect(hDC, xType1, 21&)
        Else
        Call FillRect(hDC, xType1, 17&)
        End If
      xType1.Left = xType1.Left + 1&
      xType1.Top = xType1.Top + 1&
      If xStrength > xLong1 Then
        Call FillRect(hDC, xType1, 14&)
        Else
        #If DrawSignalStrength_WhiteBackgrounds Then
          If (xStyles And CLng(DrawSignalStrength_Styles.DSSS_WhiteBG)) = 0& Then
            Call FillRect(hDC, xType1, 16&)
            Else
            Call FillRect(hDC, xType1, 6&)
            End If
          #Else
          Call FillRect(hDC, xType1, 16&)
          #End If
        End If
      xType1.Bottom = y + 16&
      Next
    End If
  End Sub