assume %gui is a GUIControl
%gui.getExtent(); returns the extent (width and height in pixels) of the GUIControl.
%gui.resize(); has some strange applications, because it has 4 arguments. The first two are the new position of the element, and the last two are the size (in pixels) of it.
To resize it, you'd use %gui.resize(0, 0, 100, 100); which would resize it to 100 pixels by 100 pixels, and move it to 0, 0.
%gui.resize(100, 100, getWord(%gui.getExtent(), 0), getWord(%gui.getExtent(), 1)); would move it to 100, 100 without changing the size. A GUIControl's position's origin is the top left, so it would move the top left of the element to 100, 100.