I made a program a few years ago in visual basic that allowed you to use a joystick as a mouse..
I used
http://allapi.mentalis.org/apilist/joyGetPos.shtml
and then you can just send the position or whatever out the serial port to be read by the basic stamp