gambas-source-code/app/examples/Misc/SystemTray/.src/FMain.class
Benoît Minisini 3c8efd56e9 [CONFIGURATION]
* NEW: Update chinese translations.

[EXAMPLES]
* NEW: Add screenshots, switch to 1.0 version, and publish.

[INTERPRETER]
* NEW: Allow WAIT to raise errors.

[GB.DESKTOP]
* NEW: DesktopWindow.Geometry is a new property that returns the geometry 
  of the window inside as a rectangle.
* NEW: DesktopWindow.Frame is a new property that returns the geometry 
  of the window outside (with the frame) as a rectangle.
* NEW: DesktopWindow.GetScreenshot() is a new method that returns a 
  screenshot of a window, with or without the frame.
* BUG: DesktopWindow X, Y, Width and Height properties return the window
  geometry without the frame.

[GB.GTK]
* NEW: Raise an error if WAIT is called during a keyboard event.

[GB.GTK3]
* NEW: Raise an error if WAIT is called during a keyboard event.

[GB.QT4]
* NEW: Raise an error if WAIT is called during a keyboard event.


git-svn-id: svn://localhost/gambas/trunk@6746 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2014-12-16 22:15:59 +00:00

64 lines
998 B
Text

' Gambas class file
'Private $hImage As Image
Public Sub _new()
'Me.Background = &H007FFF 'Color.SetAlpha(&H007FFF, 192)
End
Public Sub Form_Open()
X11Systray.Show(dwgSystemTray.Handle)
End
Static Public Sub X11Systray_Arrange()
FMain.ArrangeTray
End
Public Sub ArrangeTray()
Dim I As Integer
Dim X, Y, H As Integer
Debug
X = 2
Y = 2
For I = 0 To X11Systray.Count - 1
With X11Systray[I]
Debug I;; .IconW;; .IconH
If (X + .IconW) >= (Me.ClientW - 2) Then
X = 2
Y += H + 2
H = 0
Endif
.Move(X, Y, .IconW, .IconH)
H = Max(H, .IconH)
X += .IconW + 2
End With
Next
End
' Public Sub DrawingArea1_Draw()
'
' Paint.DrawImage($hImage, 0, 0)
'
' End
Public Sub Form_Resize()
' Dim DH As Integer
'
' Paint.Begin(draSystemTray)
' DH = 1 + draSystemTray.H / $hImage.H
' Paint.DrawImage($hImage, 0, - DH, draSystemTray.W, draSystemTray.H + DH * 2)
' Paint.End
ArrangeTray
End