Yes I think that is the only option. My example just used a panel control slightly larger than the main control.Technopeasant wrote: ↑Wednesday 11th December 2019 2:12am I wanted to be able to change the colour and size of the borders of my controls, but I might just have to add my own drawing code.
For anyone interested, here is my demo code using a TextArea and a Panel:-
Public Sub SetBorder(iSize As Integer, iColour As Integer)
TextArea1.Border = False
With Panel1
.NoTabFocus = True
.Left = TextArea1.Left - iSize
.Top = TextArea1.Top - iSize
.Width = TextArea1.Width + iSize * 2
.Height = TextArea1.Height + iSize * 2
.Background = iColour
End With
End
...and also a 1 second Timer to run it:-Public Sub Timer1_Timer()
Dim iBorder As Integer
Dim iColour As Integer
iBorder = Rnd(0, 50)
iColour = Rnd(0, 16700000)
SetBorder(iBorder, iColour)
TextArea1.Text = " Border size: " & iBorder
End