Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Dialog - Floating Toolbar.wbt
IntControl(12,1,0,0,0) ; allow exit window with no complaints IntControl(54,"",1,0,0) ; make dialog float on top IntControl(49,1,0,0,0) ; Instal system buttons on dialog #DefineFunction TransparentHwnd(hwnd,visibility) if "2-5-0" > WinVersion(5) then return ;Need Windows 2000/XP/++ for this code" WS_EX_LAYERED = 524288 ;&H80000 GWL_EXSTYLE = -20 LWA_ALPHA = 2 dllnameGDI=strcat(DirWindows(1),"GDI32.DLL") dllnameUSER=strcat(DirWindows(1),"USER32.DLL") dllnameKRNL=strcat(DirWindows(1),"KERNEL32.DLL") x=DllCall(dllnameUSER,long:"GetWindowLongA",long:hWnd,long:GWL_EXSTYLE) x=x ^ WS_EX_LAYERED DllCall(dllnameUSER,long:"SetWindowLongA",long:hWnd,long:GWL_EXSTYLE,long:x) DllCall(dllnameUSER,long:"SetLayeredWindowAttributes",long:hwnd,long:0,long:visibility,long:LWA_ALPHA) #EndFunction #DefineFunction DisableSysButton(hwnd,buttonnumber) sysmenu=DllCall(strcat(DirWindows(1),"USER32.DLL"),long:"GetSystemMenu",long:hwnd,long:0) DllCall(strcat(DirWindows(1),"USER32.DLL"),long:"RemoveMenu",long:sysmenu,long:buttonnumber,long:0) return (0) #EndFunction #DefineFunction FloatBarProc(handle,msgID,ctlID,x1,x2) MSG_INIT=0 MSG_PUSHBUTTON=2 switch msgID case MSG_INIT DialogProcOptions(handle,MSG_PUSHBUTTON,@TRUE) DisableSysButton(handle,61488) ; maximize button DisableSysButton(handle,61472) ; minimize button TransparentHwnd(handle,128) ; 0=invisible 128=50percent visible 255=100percent visible ScreenWidth = WinMetrics(0) ScreenHeight = WinMetrics(1) PpHDU = WinMetrics(-6) PpVDU = WinMetrics(-5) WinPlace(810,150,965,255,"Floating Toolbar") break case MSG_PUSHBUTTON switch ctlID case 001 ; Notepad Run("notepad.exe","") break case 002 ; Browser Run("Browser.exe","") break case 003 ; Explorer Run("Explorer.exe","") break case 004 ; Clipboard Run("clipbrd.exe","") break endswitch return -2 ; do not exit endswitch return -1 ; do normal processing #EndFunction MyDialogFormat=`WWWDLGED,6.1` MyDialogCaption=`Floating Toolbar` MyDialogX=10 MyDialogY=200 MyDialogWidth=080 MyDialogHeight=032 MyDialogNumControls=004 MyDialogProcedure=`FloatBarProc` MyDialogFont=`DEFAULT` MyDialogTextColor=`DEFAULT` MyDialogBackground=`DEFAULT,0|255|255` MyDialog001=`002,002,034,011,PUSHBUTTON,DEFAULT,"Notepad",2,1,DEFAULT,DEFAULT,DEFAULT,DEFAULT` MyDialog002=`041,002,033,011,PUSHBUTTON,DEFAULT,"Browser",3,2,DEFAULT,DEFAULT,DEFAULT,DEFAULT` MyDialog003=`002,017,034,011,PUSHBUTTON,DEFAULT,"Explorer",4,3,DEFAULT,DEFAULT,DEFAULT,DEFAULT` MyDialog004=`041,017,033,011,PUSHBUTTON,DEFAULT,"Clipboard",5,4,DEFAULT,DEFAULT,DEFAULT,DEFAULT` ButtonPushed=Dialog("MyDialog")
Article ID: W15458
File Created: 2003:05:13:11:28:04
Last Updated: 2003:05:13:11:28:04