How to put a Text- or Combobox Gadget in the Windows Taskbar

Just starting out? Need help? Post your questions and find answers here.
User avatar
pureballs
User
User
Posts: 41
Joined: Mon Oct 27, 2008 5:18 pm

How to put a Text- or Combobox Gadget in the Windows Taskbar

Post by pureballs »

Is this possible ?

If so... how ? :D
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 5012
Joined: Sun Apr 12, 2009 6:27 am

Re: How to put a Text- or Combobox Gadget in the Windows Tas

Post by RASHAD »

Try the next code

Code: Select all

SHAppBarMessage_(#ABM_GETTASKBARPOS,Pos.AppBarData)

If Pos\uEdge <> 1 And Pos\uEdge <> 3
    End
EndIf

TrayWnd       = FindWindow_("Shell_TrayWnd", 0)
TrayNofifyWnd = FindWindowEx_(TrayWnd, 0, "TrayNotifyWnd", 0)
GetWindowRect_(TrayNofifyWnd,r.RECT)

x=r\left - 200
y=r\top + 4
width=200 - 20
height=r\bottom - r\top - 8

OpenWindow(0,x,y,width,height,"", #PB_Window_BorderLess )
SetWindowPos_(WindowID(0),#HWND_TOPMOST,0,0,0,0,#SWP_NOMOVE|#SWP_NOSIZE)
   ComboBoxGadget(1,0,0,width,height)
      For a = 1 To 5
        AddGadgetItem(1, -1,"ComboBox item " + Str(a))
      Next
   SetGadgetState(1,1)

   
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
Egypt my love
Post Reply