如何制作PB中查找的窗口,可以变透明的,而且还始终在最上面的窗口?
如何制作PB中查找的窗口,可以变透明的,而且还始终在最上面的窗口?
[解决办法]
窗口类型用popup! 的(假设窗口为w_find), 在主窗口(假设为w_main)中打开,或者设置w_find的父窗口为w_main( 如:open(w_find, w_main) )
设置窗口置顶,用API函数:
function long SetWindowPos(long hwnd, long hwndinsertafter, long ax, long ay, long cx, long cy, long flags) library "user32" alias for "SetWindowPos"
setwindowpos(handle(this), -1, 0,0,0,0,3)
function long GetWindowLong(ulong hWnd, int nIndex) Library "USER32" Alias for "GetWindowLongA"
Function long SetWindowLong (ulong hWnd, int nIndex, long dwNewLong) Library "USER32" Alias for "SetWindowLongA"
Function Long SetLayeredWindowAttributes(long hWnd, Long crKey,char bAlpha, Long dwFlags) Library "user32"