What Archie is saying is that you cannot change the graphics or the shape (because the base control is not accessible).
If you just need to have a square shaped pilot light then just use square illuminated button instead.
You can always paint over the PilotLight control (add text or new graphics, just like all the code in previous posts shows).
Here is a code example of adding a blue triangle to the base control, just after MyBase.OnPaint(e) (to look like the attached picture):
Dim pointsTriangle As PointF()
If Me.LegendPlate = LegendPlates.Large Then
pointsTriangle = New PointF() {New PointF(Me.Width / 2, Me.Height / 2), _
New PointF(Me.Width / 4, Me.Height * 3 / 4), _
New PointF(Me.Width * 3 / 4, Me.Height * 3 / 4)}
Else
pointsTriangle = New PointF() {New PointF(Me.Width / 2, Me.Height / 3), _
New PointF(Me.Width / 4, Me.Height * 3 / 4), _
New PointF(Me.Width * 3 / 4, Me.Height * 3 / 4)}
End If
Dim gp As New GraphicsPath
gp.AddPolygon(pointsTriangle)
Using pgBrush As New PathGradientBrush(gp)
pgBrush.CenterColor = Color.Blue
pgBrush.SurroundColors = New Color() {Color.SteelBlue}
e.Graphics.FillPolygon(pgBrush, pointsTriangle)
End Using
To avoid errors you will also need to add the following statement at the top of the class: Imports System.Drawing.Drawing2D
I have also attached AHMI version of this PilotLightEx control (just slightly modified to allow show/hide of the text and also include the brightness settings somewhat similar to what was discussed in another topic).