Bottomwall.X1 = Bottomwall.X1
Bottomwall.X2 = Bottomwall.X2
Bottomwall.Y1 = Bottomwall.Y1 - 100
Bottomwall.Y2 = Bottomwall.Y2 - 100
^ You need to apply the checks before you execute code like that for example
Make an If statement and take away 100 to determine what it would be like if the wall was to move
then you would see if it conflicts with the mouse as hitting a wall e.g.
if BottomWall.Y1 - 100 ? mouse.y1 then
? replace with which ever code you need to <,>,=,<>,=<,=> etc
also i've noticed your moving the actual walls it would be better to just move the object its self however if its a sliding game moving the walls is easier but takes longer to process and also might be better to just draw a line rather then using lots of controls
e.g. Form1.Line (X1,Y1)-(X2,Y2),Color,[Draw Type]
with Draw Type you can have
BF = makes a Filled in box
B = makes a box with no center (usually what ever is on the background)
It's also good to put Auto Redraw on for the Form and add Form1.refresh after you have done drawing to it and
Form1.cls to clear it