uvedese Contributor
Joined: 21 Jan 2006 Posts: 169 Location: Spain
|
Posted: Wed Mar 14, 2007 4:30 pm Post subject: How to create an appBar without using API |
|
|
Hi all
I was looking for an easy solution to create a applications bar in the top or bottom of the screen so any window not has to be covered by the bar.
Look this code:
Code: |
%%height = @sysinfo(SCREENHEIGHT)
%%width = @sysinfo(SCREENWIDTH)
option decimalsep,.
DIALOG CREATE,Window Control AppBar,0,0,%%width,32,ONTOP,NOTITLE,COLOR #2662DF
DIALOG ADD,BUTTON,Close,3,3,12,11,X
DIALOG SHOW
:ev_loop
wait .01
%e = @event()
if %e
goto %e
end
%v = @winactive()
if %v
if @equal(@winpos(%v,S),3)
window normal,%v
window position,%v,32,0,%%width,@diff(%%height,61)
elsif @equal(@winpos(%v,S),1)
if @unequal(%v,Window Control AppBar)
%%top = @winpos(%v,T)
if @greater(32,%%top)
window position,%v,32
end
end
end
end
goto ev_loop
:CloseBUTTON
exit
|
Simple and without using API
________________
uVeDeSe
visit: http://www.uvedese.es
Last edited by uvedese on Wed Apr 02, 2008 7:33 pm; edited 1 time in total |
|