PDA

View Full Version : Set page size


RizlaUK
01-09-2007, 08:11 PM
Hey guys, i want to let the user resize the app window but if it gets to a certan size then i want it to lock so it cant get any smaller

i have half achived what i want with this code in page timer

pSize = Window.GetSize(Application.GetWndHandle());

if pSize.Width < 630 then
Window.SetSize(Application.GetWndHandle(), 630, pSize.Height);
end

if pSize.Height < 480 then
Window.SetSize(Application.GetWndHandle(), pSize.Width, 480);
end

but the problem is that if the user makes the app smaller than 630 x 480 it springs back to 630 x 480, is there any way of locking the window size when it reaches the above size, so the window wont go any smaller than 630 x 480,

the above methood works but its very untidy, anyone got any suggestions ;)

Worm
01-09-2007, 09:14 PM
have you tried this

http://www.indigorose.com/forums/showpost.php?p=92855&postcount=2

RizlaUK
01-10-2007, 02:55 AM
Perfect :yes

Cheers Worm ;)

Worm
01-10-2007, 07:06 AM
No cheers for me... I didn't even know the function existed until I came across a post from Dermot and Tig. They deserve the cheerios.