Welcome,
Some of the controls are available as libraries.
The TrackBar is such a control.
You need to add the TrackBar library using Tools - Components.
Then add the control Tools - Add Object - TrackBar
Attached is a small example.
B4X:
Sub Globals
End Sub
Sub App_Start
Form1.Show
bar.New1("Form1",20,20,50,200,true)
End Sub
Sub bar_ValueChanged
form1.Text = bar.Value
End Sub