strings in the Systray?

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Kale.

Is it possible to place strings into the SysTray? other than the clock?

--Kale

New to PureBasic and falling in Love! :)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by TheBeck.

I want to replace the standard windows clock with one that does more. I will post here if I have any luck. Does anyone else know how to do this, or have any ideas? How about making your systray icon stick to the right side of the systray?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by ricardo.
Originally posted by TheBeck

I want to replace the standard windows clock with one that does more.
Find a window with class: TrayClockWClass (in XP) and then parent your form with it, it should work its like the progressbar in the systray example here in the forums.

Code: Select all

If OpenWindow(0,0,0,450,200,#PB_Window_BorderLess,"Test")
  CreateGadgetList(WindowID())
  TextGadget(1,0,0,350,20,"New Time")
  ButtonGadget(2,200,100,150,25,"Go to Clock Tray")
  Repeat
    EventID=WaitWindowEvent()
    
    Select EventID
    
      Case #PB_EventGadget
        Select EventGadgetID()
          Case 2
            
            r = WindowFromPoint_(790,590); Not the best way to find the handle
            GetWindowRect_(r,win.RECT)
            x=win\left : y=win\top
            w=win\right-win\left : h=win\bottom-win\top
            ResizeWindow(w,h)
            SetParent_(WindowID(),r)
        EndSelect
    
    EndSelect
    
  Until EventID=#PB_EventCloseWindow
EndIf
Best Regards

Ricardo

Dont cry for me Argentina...
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by TheBeck.

Thanks for your help Ricardo.
Post Reply