Bitmap 0 is the screen. Bitmaps 1-32 are unseen but allow you to change to them to manipulate the graphics.
If there is only one image in the bitmap it's best to just use "load image" which combines the "load bitmap" and "get image" commands into one command.
Also you don't need to check the mouse position to keep it on the screen it automatically does that no matter what screen size it's using.
This is if you use Classic (I just remed off what you don't need):
sync rate 0
sync on
Hide Mouse
CLS
Load Bitmap "MainScreen.bmp", 0
SMouse = 100
Load image "Mouse.bmp", SMouse,1
`Get Image SMouse, 0, 0, 32, 32
`mx = MouseX()
`my = MouseY()
`If mx > 800 Then mx = 800
`If my > 600 Then my = 600
`Sprite SMouse, mx, my, SMouse
Do
`mx = MouseX()
`my = MouseY()
Sprite SMouse, mousex(), mousey(), SMouse
Sync
Loop
If you use Pro you have to use "paste image" to see the background:
sync rate 0
sync on
Hide Mouse
CLS
Load image "MainScreen.bmp",1,1
SMouse = 100
Load image "Mouse.bmp", SMouse,1
`Get Image SMouse, 0, 0, 32, 32
`mx = MouseX()
`my = MouseY()
`If mx > 800 Then mx = 800
`If my > 600 Then my = 600
``Sprite SMouse, mx, my, SMouse
Do
`mx = MouseX()
`my = MouseY()
paste image 1,0,0
Sprite SMouse, mousex(), mousey(), SMouse
Sync
Loop
Hope this helps.