<div dir="ltr"><div>The code is:</div><div><br></div><div>' Gambas class file<br><br>Private $hTrayIcons As New TrayIcon[]<br>Public Sub Form_Open()<br>Dim hTray As TrayIcon<br><br>  Dim i As Integer<br>  Dim hDBusApplication As DBusApplication<br>  Dim hConnection As DBusConnection<br>  Dim hDBusProxy As DBusProxy<br>  Dim sDBusName, sDBusObjectPath, sDBusInterface As String<br>  Dim aChildren As New String[]<br>  Dim aVal As Variant[]<br>  Dim s As String<br><br>    <br>  sDBusName = "org.freedesktop.NetworkManager"<br>  hConnection = DBus.System<br>  hDBusApplication = New DBusApplication(hConnection, sDBusName)<br>  <br>  sDBusObjectPath = "/org/freedesktop/NetworkManager"<br>  sDBusInterface = "org.freedesktop.NetworkManager"<br>  hDBusProxy = New DBusProxy(hDBusApplication, sDBusObjectPath, sDBusInterface)<br>  <br>  aChildren = hDBusProxy.Children<br>  <br>  txaReport.Insert(gb.NewLine)<br>  For i = 0 To aChildren.Max<br>    txaReport.Insert(sDBusObjectPath &/ aChildren[i] & gb.NewLine)<br>  Next<br><br>  s = DBus["system://org.freedesktop.NetworkManager"]["/org/freedesktop/NetworkManager", "org.freedesktop.NetworkManager"].GetAllDevices().Join("\n")<br> Print s<br><br> If s Then<br>    hTray = New TrayIcon<br>    hTray.Name = s <br>    $hTrayIcons.Add(hTray)<br>    hTray.Icon = Picture["icon:/32/connect"]<br>    Endif<br>  'Next<br> <br>   dwgSystemTray.Refresh<br>  <br>End<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mié., 22 abr. 2020 a las 21:44, herberth guzman (<<a href="mailto:herberthguzman@gmail.com">herberthguzman@gmail.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span lang="en"><span title="">Hi Benoit</span><br><br><span title="">I don't have the necessary knowledge for everything I want to do, but I try.</span><br><br><span title="">I want to make a system tray, could you check my code please.</span><br><br><span title="">Could you help me as I managed to get the popup menu of networkmanager (example list of wifi networks) by clicking on the icon of the network menu and at the same time if you think I am on the right path to continue or could you advise me please.</span><br><br><span title="">i need my new system tray</span><br></span><span lang="en"></span><div><br></div><div><span lang="en"><span title="">at the moment i need networkmanager</span><br><span title="">but in the future I need to show any app in the systray (example vlc, audio, others)</span></span></div><div><br></div><span lang="en"><span title="">thank you very much</span></span></div>
</blockquote></div>