windowstate

PyQt5 can't delete flag WindowStaysOnTopHint under Ubuntu 18.04

谁都会走 提交于 2020-03-05 07:31:42
问题 I'm trying to make a button which would place window on top of others. Using recommends from other questions, I put in my class setWindowFlags(self.windowFlags() | QtCore.Qt.WindowStaysOnTopHint) to set and setWindowFlags(self.windowFlags() & ~QtCore.Qt.WindowStaysOnTopHint) to delete flag. It sets the flag, but when i change the button state, it still has that flag enabled. Here is code example: from PyQt5 import QtWidgets, QtCore import sys class widget(QtWidgets.QWidget): def __init__(self

How to pass WindowState from desktop shortcut into WPF app?

北战南征 提交于 2020-01-03 17:12:13
问题 How can I control the initial WindowState (Normal, Minimized, Maximized) of a WPF main window from a desktop shortcut? The "Run:" combobox of the shortcut's properties dialog let's me choose between "Normal window", "Minimized" and "Maximized". But this option seems to be completely ignored by WPF apps. With WinForms this was automatically supported with no additional code. Is there a way to access this option from the launched WPF process? I know I can specify the ProcessStartInfo

Binding the “WindowState” property of a window in WPF using MVVM

点点圈 提交于 2019-12-19 06:05:40
问题 I bound the "WindowState" property of my main window to my ViewModel in order to change the state of the window by a command, but the first time I minimize the window it minimizes like a worksheet does in an Excel file. Is there a work around for this or a correct way to bind the "WindowState" property to my ViewModel so that the window minimizes correctly? 回答1: I don't think you should care about the window state in a view model, it's completely wrong because a lower-level layer is aware of

How to trap the Window state? [closed]

孤街浪徒 提交于 2019-12-11 06:44:08
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 8 years ago . I'd a snipped and want to know how to trap it? frame.addWindowStateListener(new WindowStateListener(){ public void windowStateChanged(WindowEvent e) {

Setting WindowState to Maximized causes window to appear too early

丶灬走出姿态 提交于 2019-12-08 18:08:05
问题 I read that the Load event is supposed to be fired after the window handle has been created, but before the window actually become visible. For the most part, this seems to be true. However, I've found that when I create a form with the WindowState property set to FormWindowState.Maximized (either via the VS designer, or programatically in the constructor), the window becomes visible prior to the Load event firing. For example: using System; using System.Windows.Forms; namespace MyApplication

C#: capture windowstate changes of another application (wrote in c/c++ i think)

﹥>﹥吖頭↗ 提交于 2019-12-02 19:04:22
问题 I have a situation where I need to capture windowstate changes of another window (which is not owned by my application and I didn't wrote it. I think it's written in C++). Actually I'm using a separate thread where I constantly do GetWindowState and fire custom events when this value changes (I have the handle of the window), but I would like to know if there is a better method Thanks, P.S. I'm using winform if can be useful in any way 回答1: //use this in a timer or hook the window //this

WPF: Window stays minimized even when setting WindowState explicitly

做~自己de王妃 提交于 2019-12-01 14:42:36
问题 My application has a tray icon which, when double-clicked, hides or shows the application window. My issue is that I can't seem to bring the window to the foreground if it was in a minimized state when it was hidden. For instance, say the user minimizes the application and then double-clicks the tray icon. The application window is then hidden and disappears from the taskbar. When the user double-clicks the tray icon again, the application window should appear, i.e. it should be restored from

How can I prevent other apps from stealing the focus?

你离开我真会死。 提交于 2019-12-01 06:39:59
I have a fullscreen window with the Topmost property set to true. Whenever an application changes its WindowState property, my window is automatically minimized even though it has the active focus. For example, the code below exemplifies the problem. 3 seconds after the window is deactivated, it changes from Minimized to Normal, minimizing the other fullscreen application. // Topmost = false private void Form1_Deactivate(object sender, EventArgs e) { System.Threading.Thread.Sleep(3000); this.WindowState = FormWindowState.Normal; } Is there a way to preserve the fullscreen window's WindowState

How can I prevent other apps from stealing the focus?

我的未来我决定 提交于 2019-12-01 04:13:32
问题 I have a fullscreen window with the Topmost property set to true. Whenever an application changes its WindowState property, my window is automatically minimized even though it has the active focus. For example, the code below exemplifies the problem. 3 seconds after the window is deactivated, it changes from Minimized to Normal, minimizing the other fullscreen application. // Topmost = false private void Form1_Deactivate(object sender, EventArgs e) { System.Threading.Thread.Sleep(3000); this

WPF : Maximize window with WindowState Problem (application will hide windows taskbar)

删除回忆录丶 提交于 2019-11-30 11:21:41
I have set my main window state to "Maximized" but the problem is my application will fill the whole screen even task bar. what am i doing wrong ? I'm using windows 2008 R2 with resolution : 1600 * 900 Here is the Xaml : <Window x:Class="RadinFarazJamAutomationSystem.wndMain" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:local="clr-namespace:RadinFarazJamAutomationSystem" xmlns:mwt="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" Title=