How can I create and display scrollbar indicators ?

I want to implement a scrollbar to a list box created by me , NOT a control.
what I need is a small source code of how can I display the scrollbar and how can I set the scroolbar position ?

Thanks in advance.