minimize

detect keypression when minimized and trayicon

别等时光非礼了梦想. 提交于 2019-11-28 11:53:11
问题 For my test I've created a little program in C# to detect key presses with this code: protected override void OnKeyDown(KeyEventArgs e) { if (e.KeyCode == Keys.F12) MessageBox.Show("f12 pressed"); } This works fine when the form is focused and active. I've spent many time to find how to set it for works when minimized, I found a solution here to add system tray icon. I followed solution but didn't work anymore. When i minimize it, the icon tray appears and works, but i didn't detect key

Qt hide minimize, maximize and close buttons

徘徊边缘 提交于 2019-11-28 10:01:47
Do you know how to hide minimize, maximize and close buttons of title bar in Qt. I especially need to hide it on QMainWindow. Set this window flags Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint Note, that on some platforms it behaves in different way. For example on Mac OS X it Disables, (not hides) close/minimize/maximize buttons ams If you are using Qt qml then, to remove minimize, maximize and close button, set the frameless window flag in the window function in your main.qml file, like below: flags: Qt.FramelessWindowHint lolo67 This can be achived by using an eventFilter on

Minimize a window in WPF?

試著忘記壹切 提交于 2019-11-28 07:57:29
How do you minimize a window programmatically when using windows WPF ? I can seem to find a .Resize attribute? set WindowState = WindowState.Minimized; You are looking for the Window.WindowState property. It is a dependancy property and when changed will set the Window.RestoreBounds property , so you can always restore to the size before the change. See the enumeration here . myWindow.WindowState = WindowState.Minimized; this.WindowState = WindowState.Minimized; For those who had the same problem: keep in mind that if ShowInTaskbar is set to false, then WindowState.Minimized minimizes the

Win32 C API for redirecting minimize animation

断了今生、忘了曾经 提交于 2019-11-28 07:56:27
问题 I have seen RocketDock redirect the minimize animation in Vista so windows minimize to the dock, and am just curious how this was done. Is the actual minimize animation redirected to the dock, or is something like a hook to stop Windows from minimizing the window and RocketDock has a custom animation when the window is minimized? 回答1: The ptMinPosition member of the WINDOWPLACEMENT structure specifies the coordinates of the window when it is minimized, so SetWindowPlacement function can be

How to make an undecorated window movable / draggable in JavaFX?

心已入冬 提交于 2019-11-28 07:38:14
I have to create an application in which minimize and maximize button will be disabled. I have used "StageStyle.UNDECORATED" with which the application will not be movable or draggable anymore, so I am searching for any other alternative to make my application. Do anyone having solution for this? To achieve the window to be undecorated but still movable/dragable you have to handle the appropriate MouseEvent on any node of your choice. Example: import javafx.application.Application; import javafx.event.EventHandler; import javafx.scene.Scene; import javafx.scene.input.MouseEvent; import javafx

Having the application minimize to the system tray when button is clicked?

女生的网名这么多〃 提交于 2019-11-28 03:38:11
问题 How can I have my application minimize itself to the system tray in WindowsXP/Vista? I'm also looking for a way to have a message display itself when the mouse is hovered on the icon. Is it possible to have two lines in the pop up balloon? 回答1: I assume you mean minimize to the System tray because you have talked about icons and message ballons? The following code will set up a tray icon: private void SetUpTrayIcon() { notifyIcon = new System.Windows.Forms.NotifyIcon(); notifyIcon

How to disable the minimize button in C#?

旧街凉风 提交于 2019-11-28 00:12:43
In my application I need to temporarily gray out the minimize button of the main form. Any ideas how this can be achieved? I don't mind doing p/invokes to Win32 dlls. Edit: Graying out the minimize button would be the preferred solution, but is there any other way of preventing the form from becoming minimized? I read your comment in regards to my response and was able to drum up a more complete solution for you. I ran this quickly and it seemed to have the behavior that you wanted. Instead of deriving your winforms from Form, derive from this class: using System; using System.Windows.Forms;

PyQt4 Minimize to Tray

最后都变了- 提交于 2019-11-27 18:11:20
Is there a way to minimize to tray in PyQt4? I've already worked with the QSystemTrayIcon class, but now I would like to minimize or "hide" my app window, and show only the tray icon. Has anybody done this? Any direction would be appreciated. Using Python 2.5.4 and PyQt4 on Window XP Pro It's pretty straightforward once you remember that there's no way to actually minimize to the system tray . Instead, you fake it by doing this: Catch the minimize event on your window In the minimize event handler, create and show a QSystemTrayIcon Also in the minimize event handler, call hide() or setVisible

How to minimize a JFrame window from Java?

给你一囗甜甜゛ 提交于 2019-11-27 14:18:05
In my Java app, I have a JFrame window, how can I minimize it from my Java program ? minimize with frame.setState(Frame.ICONIFIED) restore with frame.setState(Frame.NORMAL) Minimize: frame.setState(Frame.ICONIFIED); Another way to minimize: frame.setExtendedState(JFrame.ICONIFIED); Normal size: frame.setState(Frame.NORMAL); Another way to normal size: frame.setExtendedState(JFrame.NORMAL); Maximize: frame.setState(Frame.MAXIMIZED_BOTH); Another way to maximize: frame.setExtendedState(JFrame.MAXIMIZED_BOTH); Full Screen maximize: GraphicsDevice device = GraphicsEnvironment