Code:
video_set(640,480,32,2); // 640x480x32bit window
If you like Lite-C maybe you can change the if's in your code to switch case which also looks nicer. I don't think you need video_mode anymore and remember 640x480 is already the default resolution acknex engine is using. Also there is a bug in A7.06.1 with higher resolutions, at least i'd thought so when trying it on my widescreen.