system-tray

Rare error on Tray icon creation, after a user log out / log in

冷暖自知 提交于 2019-12-11 06:25:18
问题 I create a systray icon with: BOOL TrayMessage(HWND hWnd, DWORD dwMessage) { NOTIFYICONDATA nid; nid.cbSize = sizeof(nid); nid.hWnd = hWnd; nid.uID = 1; nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; nid.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_MYAPP)); lstrcpy(nid.szTip, L"MyApp"); nid.uCallbackMessage = WM_NOTIFYICON; return Shell_NotifyIcon(dwMessage, &nid); } when the app starts / the window is created: case WM_CREATE: if (!TrayMessage(hWnd, NIM_ADD)) MessageBox(hMainWnd, L"Tray error.

Get information about hidden tray icons in windows7

余生长醉 提交于 2019-12-11 06:19:01
问题 I am trying to get information on the system tray icons in windows 7. I am able to do so only on the visible icons in the 'User Promoted Notification Area' ToolBarWindow32. but how can I get information on the hidden icons ? 回答1: There's no public interface to work with notification icons other than the ones you own. You can only do this by hacking and reverse engineering the shell. 回答2: There is an undocumented COM interface ITrayNotify for retrieving tray icons and changing their visibility

tray component for Delphi

泪湿孤枕 提交于 2019-12-11 03:47:34
问题 Please advice some modern tray component for Delphi. The more functionality it has is better. It should support Delphi 2010. I just need to place an icon to tray and handle clicking on it and show popup when mouse cursor is over it. 回答1: What about TTrayIcon. It's been in Delphi since Delphi2006. 回答2: If you have a very old delphi version (older than 2006) then try the free TJvTrayIcon in the JEDI VCL. 回答3: I'm pretty sure that the Raize suite has a tray icon component. The suite isn't free,

System tray displayMessage() not showing

泪湿孤枕 提交于 2019-12-11 03:36:28
问题 So what I want is when my program runs (It's a system tray) one of those small notification problems show up at the bottom right of the screen. I tried. trayIcon = new TrayIcon(image, "Title", popup); trayIcon.setImageAutoSize(true); trayIcon.displayMessage("Title", "MESSAGE HERE", TrayIcon.MessageType.ERROR) //THIS IS THE LINE THAT SHOULD SHOW THE MESSAGE Where should it be for it to run when the program runs and is that the correct method with the correct parameters? 回答1: Have you had a

Issue when minimizing forms with Charts to System Tray,

て烟熏妆下的殇ゞ 提交于 2019-12-11 03:11:43
问题 I have a form that I minimize to the system tray, by hooking-in to the form_resize event. All worked well, until I added a Chart to the form. When the chart is on the form, I would get the following exception: Width must be greater than 0px. The highlighted line is: this.ShowInTaskbar = false; It took me a bit of time frigging around to work-out what the problem was (including that it was adding the Chart that caused it), but managed to deduce it from very long stack trace messages. Anyway, I

How do I launch .net windows forms application with no visible windows?

一笑奈何 提交于 2019-12-10 16:46:12
问题 I have a .net windows forms application that needs to open directly to the notify icon (system tray) with no visible windows. I realize that I can do this in the onshown event or something like it. But if I do that I get a flash of the window. How can I avoid that flash? I have tried modifying my Program.cs file to look like this: Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); MainForm frm = new MainForm(); frm.Visible = false; Application.Run(frm);

Creating a keyboard hook for a Java program that sits in the System Tray

旧街凉风 提交于 2019-12-10 15:38:00
问题 Basically I have a java program that runs in the system tray and would like to add make it so if the user pressed say CTRL+SHIFT+1 it selects one of the right click options of the java program that sits in the tray. I guess what I'm looking for is a tutorial on doing this, or what the simplest approach would be. I have never done something like this before, so possibly some sort of noobie tutorial? Thanks 回答1: so , creating a keyboard hook isn't as easy as it looks , java doesn't provide a

System Tray Pop up menu item with Image(Icon to the MenuItem)

血红的双手。 提交于 2019-12-10 11:41:16
问题 I read the system tray tutorial and this similar Stack Overflow question but can't find a good answer. I want to add an image to menu item in J2SE application. In the tutorial, MenuItem is used, but I couldn't find how to add icons to menu items in SystemTray pop up. If JMenuItem is used, icons can easily be placed in MenuItems , but there is MenuItem . How can I add an image to my system tray popmenu? Updated Here, I want to add an image to MenuItem in the popup menu(not to the SystemTray.)

Can I create a wxPython tray icon application without the Python icon appearing in the Dock?

三世轮回 提交于 2019-12-10 11:27:15
问题 Here is the slightly modified source code for an example tray icon application I found on SO: import wx TRAY_TOOLTIP = 'System Tray Demo' TRAY_ICON = 'icon.png' def create_menu_item(menu, label, func): item = wx.MenuItem(menu, -1, label) menu.Bind(wx.EVT_MENU, func, id=item.GetId()) menu.AppendItem(item) return item class TaskBarIcon(wx.TaskBarIcon): def __init__(self): super(TaskBarIcon, self).__init__() self.set_icon(TRAY_ICON) self.Bind(wx.EVT_TASKBAR_LEFT_DOWN, self.on_left_down) def

Java attach JFrame to a running application window?

风格不统一 提交于 2019-12-10 11:24:47
问题 How can I attach a JFrame in the top right to another applications open window and stay with it while resizing? Is it possible? Here is a diagram of what i would like to accomplish: Thanks for the help! If this is not possible, are there alternatives ? Ways to get window size/location and set my own jframe accordingly? 回答1: You are asking Java to modify an already running non-Java program, and for these types of problems, Java is not the best tool. Please understand that one of Java's main