Quote: "Thanks for your offer. Though I already have partly done. (Actually it's in the program, but since I did not have time to finish it, I took it out.) Selecting the them by mouse is easy, what takes longer is the code for resizing the gadget. I should have done soon though. "
i have both codes working
here they are [uncommented though]
set display mode 640,480,32
sync on : sync rate 0
set window on
start bbb gui `"Media\Ruby.msstyles"
windows set font 7,"Arial",0,0,0,0
windows set icon "Media\dbpro_icon.ico"
windows set visibility 1
dbpro_w=get dbpro window()
set main window dbpro_w
maximize window dbpro_W
window set style dbpro_w,window get style(dbpro_w)||WS_CLIPCHILDREN||WS_CLIPSIBLINGS
dim control(20)
global iControlCount
w3=make window(50,50,300,300,"Standard window",dbpro_w, WS_OVERLAPPEDWINDOW)
window set icon w3, "Media\dbpro_icon.ico"
bb=make listview(20,20,150,200,0,LVS_REPORT||LVS_SINGLESEL,w3)
listview insert column bb,0,"1.Column"
listview insert column bb,2,"2.Column"
add(bb)
bbb=make button(5,35,100,20,"Button",bb)
add(bbb)
bb=make window(120,20,120,100,"",bb, WS_CHILD)
window set color bb,100,0,0
add(bb)
a=make radiobox(220,40,120,20,"Radiobox",w3)
add(a)
a=make progressbar(320,20,200,20,0,w3)
progressbar set range a,100
progressbar set position a,75
add(a)
a=make trackbar(320,40,200,20,0,500,w3)
add(a)
`bb=make window(220,20,120,100,"",w3, WS_CHILD)
`wb=make WebBrowser("http:\\www.google.com",bb)
tab=make tab control(20,20,200,200,TCS_FIXEDWIDTH,w3)
tab insert item tab,"a",0
add(tab)
a=make checkbox(300,100,100,20,"Checkbox",w3)
add(a)
a=make treeview(10,300,80,100,w3)
b=treeview insert item(a,"Root 1", 1, 2)
add(a)
e1=make editbox(300,300,150,20,0,w3) : editbox set cuebanner e1,"This is cuebanner text"
add(e1)
a=make scrollbar(400,20,15,200,SBS_VERT,w3)
add(a)
bb=make window(400,200,100,100,"",w3, WS_CHILD)
a=make groupbox(0,0,100,100,"Groupbox 1",bb)
add(bb)
bb=make window(400,320,100,100,"",w3, WS_CHILD)
a=make groupbox(0,0,100,100,"Groupbox 1",bb)
add(bb)
color2 as dword
color2=make_transparent_color(0,0,0,1)
w=make layered window(450,50,400,300,"Media\llc_loading_frame.bmp",color2,w3,LWA_ALPHA)
window set property w,"_static",1
left=make layered window(450,50,400,300,"Media\llc_loading_frame.bmp",color2,w3,LWA_ALPHA)
window set property left,"_static",1
window set position left,1000,1000
right=make layered window(450,50,400,300,"Media\llc_loading_frame.bmp",color2,w3,LWA_ALPHA)
window set property right,"_static",1
window set position right,1000,1000
bottom=make layered window(450,50,400,300,"Media\llc_loading_frame.bmp",color2,w3,LWA_ALPHA)
window set property bottom,"_static",1
window set position bottom,1000,1000
top=make layered window(450,50,400,300,"Media\llc_loading_frame.bmp",color2,w3,LWA_ALPHA)
window set property top,"_static",1
window set position top,1000,1000
ll=load cursor(5)
window set cursor left,ll
window set cursor right,ll
rr=load cursor(6)
window set cursor bottom,rr
window set cursor top,rr
type T_Globals
hCenter hLeft hRight hTop hBottom
hSelectedControl
iAction
endtype
global g as T_Globals
make object box 1,2,2,2
do
`text 20,20,str$(tab)
`text 20,40,str$(window position y(bb))
text 20,60,str$(bbb get_windowundermouse())
x=cursor get position x()
y=cursor get position y()
if get mouseclick()=0
action=0
window set position w,1000,1000
if we>0
show window we,0
width=window width(we)
height=window height(we)
xx=window position x(we)
yy=window position y(we)
bb=bbb get_windowundermouse()
if bb<>left and bb<>right and bb<>bottom and bb<>top
window set parent we,bb
xxx=convert to client x(bb,xx)
yyy=convert to client y(bb,yy)
window set position we,xxx,yyy
endif
`left
window set size left,4,height
window set position left,xx,yy
`right
window set size right,4,height
window set position right,xx+width-4,yy
`bottom
window set size bottom,width,4
window set position bottom,xx,yy+height-4
`top
window set size top,width,4
window set position top,xx,yy
show window we,1
endif
kebo=0:we=0
endif
for t=0 to iControlCount-1
bb=control(t)
if mouse on window(bb) and get mouseclick()=1 and action=0
saved=bb
width=window width(bb)
height=window height(bb)
xx=window position x(bb)
yy=window position y(bb)
window set size w,width,height
window set position w,xx,yy
window bring to top w
endif
next t
if mouse on window(w)
if get mouseclick()=1 and action=0
we=saved
action=1
endif
endif
if we>0 and action=1
if get mouseclick()=1 and kebo=0
kebo=1
raz_x=x-window position x(w)
raz_y=y-window position y(w)
endif
if get mouseclick()=1
xx=x-raz_x
yy=y-raz_y
p=window get parent(we)
xxx=convert to client x(p,xx)
yyy=convert to client y(p,yy)
window set position w,xx,yy
window set position we,xxx,yyy
endif
endif
`endif
if mouse on window(left)
if get mouseclick()=1 and action=0
we=saved
action=2
endif
endif
if we>0 and action=2
if get mouseclick()=1 and kebo=0
kebo=1
f_x=window position x(we)+window width(we)
f_y=window position y(we)+window height(we)
raz_x=x-window position x(left)
raz_y=y-window position y(left)
endif
if get mouseclick()=1
xx=x-raz_x
yy=y-raz_y
window set position left,xx,window position y(left)
p=window get parent(we)
xxx=convert to client x(p,xx)
yyy=convert to client y(p,window position y(we))
window set position we,xxx,yyy
window set size we,f_x-xx,window height(we)
endif
endif
if mouse on window(right)
if get mouseclick()=1 and action=0
we=saved
action=3
endif
endif
if we>0 and action=3
if get mouseclick()=1 and kebo=0
kebo=1
f_x=window position x(we)+window width(we)
f_y=window position y(we)+window height(we)
raz_x=x-window position x(right)
raz_y=y-window position y(right)
endif
if get mouseclick()=1
xx=x-raz_x
yy=y-raz_y
window set position right,xx,window position y(right)
p=window get parent(we)
xxx=convert to client x(p,xx)
yyy=convert to client y(p,window position y(we))
//window set position we,xxx,yyy
window set size we,xx-window position x(we),window height(we)
endif
endif
//bottom
if mouse on window(bottom)
if get mouseclick()=1 and action=0
we=saved
action=4
endif
endif
if we>0 and action=4
if get mouseclick()=1 and kebo=0
kebo=1
f_x=window position x(we)+window width(we)
f_y=window position y(we)+window height(we)
raz_x=x-window position x(bottom)
raz_y=y-window position y(bottom)
endif
if get mouseclick()=1
xx=x-raz_x
yy=y-raz_y
window set position bottom,window position x(bottom),yy
p=window get parent(we)
xxx=convert to client x(p,window position x(we))
yyy=convert to client y(p,yy)
//window set position we,xxx,yyy
window set size we,window width(we),yy-window position y(we)
endif
endif
//top
if mouse on window(top)
if get mouseclick()=1 and action=0
we=saved
action=5
endif
endif
if we>0 and action=5
if get mouseclick()=1 and kebo=0
kebo=1
f_x=window position x(we)+window width(we)
f_y=window position y(we)+window height(we)
raz_x=x-window position x(top)
raz_y=y-window position y(top)
endif
if get mouseclick()=1
xx=x-raz_x
yy=y-raz_y
window set position top,window position x(top),yy
p=window get parent(we)
xxx=convert to client x(p,window position x(we))
yyy=convert to client y(p,yy)
window set position we,xxx,yyy
window set size we,window width(we),f_y-yy
endif
endif
repeat
get event
h=event get handle()
m=event get message()
if h=get main window()
if m=WM_CLOSE
a=make message box("Are you sure you want to quit?","BBB Gui plugin",MB_YESNO)
if a=IDYES then end bbb gui : end
endif
endif
until m=0
yrotate object 1,object angle y(1)+1
sync
loop
function make_transparent_color(r,g,b,alpha)
col as dword
col=rgb(r,g,b)
col=(col && (alpha<<24))
endfunction col
function add(w)
control(iControlCount)=w
inc iControlCount
endfunction
you will also need the newest version of bbb gui