Boo Valued Contributor


Joined: 31 Oct 2003 Posts: 599 Location: Gulf Breeze, Florida USA
|
Posted: Mon Feb 28, 2005 3:01 pm Post subject: |
|
|
Try this one...
Cheers,
- Boo
| Code: |
title Boo's Docking Example
RUNH notepad.exe
repeat
wait
until @winexists(Untitled - Notepad)
dialog CREATE,Boo's Docking Example,-1,0,560,390,class MyApp,notitle
DIALOG ADD,STYLE,Title,ms sans serif,6,b,,WHITE
DIALOG ADD,line,line1,-1,0,560,390
DIALOG ADD,GROUP,window,0,0,559,19
DIALOG ADD,GRADIENT,WinTop,0,0,559,19,BLACK,BLUE,,LEFTTORIGHT
DIALOG ADD,TEXT,wintitle,2,1,559,17," Boo's Docking Example",,Title
DIALOG ADD,BUTTON,BUTTON1,82,231,,,close
dialog SHOW
Window ontop,Boo's Docking Example
Window ontop,Untitled - Notepad
LOADLIB USER32
%%parenty = @diff(@mousepos(Y),@dlgpos(,T))
%%parentx = @diff(@mousepos(X),@dlgpos(,L))
window position,Untitled - Notepad,@fadd(@diff(@mousepos(Y),%%parentY),200),@diff(@mousepos(X),%%parentX),560,190
window normal,Untitled - Notepad
window ontop,Untitled - Notepad
:Evloop
window activate,Untitled - Notepad
%E = @event()
if @not(@null(%E))
goto %E
end
if @mousedown(L)
%B = @strdel(@WINEXISTS(#MyApp),1,1)
if %B
%B = @lib(user32,SetWindowPos,BOOL:,%B,-2,0,0,0,0,3)
else
ERROR -1
end
%%parenty = @diff(@mousepos(Y),@dlgpos(,T))
%%parentx = @diff(@mousepos(X),@dlgpos(,L))
repeat
dialog setpos,,@diff(@mousepos(Y),%%parentY),@diff(@mousepos(X),%%parentX)
window position,Untitled - Notepad,@fadd(@diff(@mousepos(Y),%%parentY),200),@diff(@mousepos(X),%%parentX)
until @not(@mousedown(L))
dialog setpos,,@diff(@mousepos(Y),%%parentY),@diff(@mousepos(X),%%parentX)
window position,Untitled - Notepad,@fadd(@diff(@mousepos(Y),%%parentY),200),@diff(@mousepos(X),%%parentX)
window ontop,Boo's Docking Example
end
goto evloop
:Button1button
:close
FREELIB USER32
window close,Untitled - Notepad
exit
|
|
|