---- private declare function getwindowlong lib "user" (byval hwnd as integer, byval nindex as integer) as long ---- private declare function setwindowlong lib "user" (byval hwnd as integer, byval nindex as integer, byval dwnewlong as long) as long ---- private declare sub setwindowpos lib "user" (byval hwnd as integer, byval hwndinsertafter as integer, byval x as integer, byval y as integer, byval cx as integer, byval cy as integer, byval wflags as integer) ---- const swp_nosize = &h1 ---- const swp_nozorder = &h4 ---- const swp_nomove = &h2 ---- const swp_drawframe = &h20 ---- const gwl_style = (-16) ---- const ws_thickframe = &h40000
---- private declare function getwindowlong lib "user32" alias "getwindowlonga" (byval hwnd as long, byval nindex as long) as long ---- private declare function setwindowlong lib "user32" alias "setwindowlonga" (byval hwnd as long, byval nindex as long, byval dwnewlong as long) as long ---- private declare function setwindowpos lib "user32" (byval hwnd as long, byval hwndinsertafter as long, byval x as long, byval y as long, byval cx as long, byval cy as long, byval wflags as long) as long ---- const swp_nosize = &h1 ---- const swp_nozorder = &h4 ---- const swp_nomove = &h2 ---- const swp_drawframe = &h20 ---- const gwl_style = (-16) ---- const ws_thickframe = &h40000
---- sub resizecontrol(controlname as control, formname as form) ---- dim newstyle as long ---- newstyle = getwindowlong(controlname.hwnd, gwl_style) ---- newstyle = newstyle or ws_thickframe ---- newstyle = setwindowlong(text1.hwnd, gwl_style, newstyle) ---- setwindowpos controlname.hwnd, formname.hwnd, 0, 0, 0, 0, swp_nozorder or swp_nosize or swp_nomove or swp_drawframe ---- end sub