try this...

Code:
#include <acknex.h>
#include <default.c>

////////////////////////////////////////////////////////////////////
var speed = 50;

BMAP* mouse_pcx = "mouse.pcx"; // bitmap used for the mouse pointer

////////////////////////////////////////////////////////////////////

function main()
{
video_mode = 7; 
screen_color.blue = 150;
mouse_map = mouse_pcx;
mouse_mode=1;

while(1) 
{
mouse_pos.x = mouse_cursor.x;    // snap mouse
mouse_pos.y = mouse_cursor.y;    // snap mouse
wait(1);
}
}

//////////////////////////////////////////////////////////////////////

PANEL* main_pan =
{
bmap = "main2.pcx";
pos_x = 250; 
pos_y = 200; 
vslider (16, 71, 90, "slider.pcx", 0, 100, speed); 
digits (15, 50, 3, *, 1, speed); 
flags = OVERLAY | VISIBLE;
}