I made a loading screen for one of my projects, before I got too busy. That was because I needed it though; lots of data had to be scanned, and the results stored, every time a map was loaded. What I did was this:
Set a variable (say @max) to a reasonable value.
Set another variable (say @current) to 0.
Every time an operation which is part of the loading completes, increase @current by one. @max should be set so that the loading is finished when @current == @max.
Then, before the loading starts, I created a new thread which would draw the loading bar based on the two variables, then make the graphics update, then sleep for 0.2 seconds and allow the main thread to continue.
If you didn't quite catch that last part, chances are nothing you write needs a loading screen.
Most things you find won't need it either.
If you still want a loading screen, because it's "cool" or something, then do some searching. Zeriab made one, and I'm sure there are others, ready to be used and abused.