The present system resolution can be determined by sys_metrics(0) and sys_metrics(1).

Now you can just set the resolution like this:

Code:
set resolution
video_set(sys_metrics(0),sys_metrics(1),32,1);


That way the engine resolution is always the system resolution.
As for the Panels. I use my normal system resolution of 1280/1024 to place them and find the right size and then a function adjustes the variables to any other system resolution. I don't know if this is the best solution but it works alright for me.

Code:
resx = screen_size.x;
resy = screen_size.y;

function adabtScrSizePanel(PANEL* tempP)		
{
tempP.pos_x = tempP.pos_x * (resx/1280);
tempP.pos_y = tempP.pos_y * (resy/1024);
tempP.scale_x = tempP.scale_x * (resx / 1280);
tempP.scale_y = tempP.scale_y * (resy / 1024);
}