PDA

View Full Version : Pin Button + Code (set ontop on the fly)


RizlaUK
01-13-2007, 10:39 AM
Hi Guys, i wanted to let the user have the choice of weather to have the app pinned or unpinned (ontop) i took the images from the custom browser example on Azmanar's Site (http://www.azman.info/ams/) and gave them alphs trans (although my psp skills are not great and some of you could proberly do a better job)

i made a button out of them, make the button toggle and use this code in the onclick event of the button

onTop = Button.GetState("Button1");
if onTop == 1 then
Window.SetOrder(Application.GetWndHandle(), HWND_TOPMOST);
else
Window.SetOrder(Application.GetWndHandle(), HWND_NOTOPMOST);
end
Page.Redraw();

now your users can pin and unpin your app on the fly

like i say, its not the greatest button, and if anyone feels like tidying it up a lil bit id love to have it

bobbie
02-16-2007, 08:57 PM
Thanks RizlaUK, works great..

mz241508
02-17-2007, 03:23 AM
thanks for sharing!!!

wasim21k
02-19-2007, 08:57 AM
thanx m8, its gr8 tip.
always looking for something little tips. :D

wasim21k
04-04-2007, 03:29 AM
sorry RizlaUK today i was trying to use this pin
on click of button but its not working for me
am i missing something?

GoOgLe
04-04-2007, 03:43 AM
here u go wasim21k

an example

jimmyID
04-04-2007, 08:31 AM
Style : Toggle.

Saludos ;)

mindstitchdr
04-04-2007, 12:01 PM
Thanks RizlaUK, works great.