Questions tagged [window-position]
46 questions
29
votes
4 answers
How to get and set the window position of another application in C#
How can I get and set the position of another application using C#?
For example, I would like to get the top left hand coordinates of Notepad (let’s say it's floating somewhere at 100,400) and the position this window at 0,0.
What's the easiest way…

James
- 1,397
- 3
- 21
- 30
16
votes
1 answer
Move other windows on Mac OS X using Accessibility API
I'm trying to use the Accessibility API to change the position of other applications windows.What I wish to do is to get all the windows on the screen from all the applications, then move them all a given offset (lets say 5 or 10 or any value). I am…

tria
- 339
- 3
- 10
8
votes
3 answers
Check if currently minimized window was in maximized or normal state at the time of minimization
How can I distinguish whether a currently minimized window was maximized before that, as opposed to normal state in C#/WinForms?
if (WindowState == FormWindowState.Minimized)
{
Properties.Settings.Default.Location = RestoreBounds.Location;
…

sashoalm
- 75,001
- 122
- 434
- 781
6
votes
2 answers
PyQt4 what is the best way to center dialog windows?
When I .show() an dialog it usually shows up a little to the left, I have no idea why. I wanted to center all my opened dialogs so i used:
qr = dlgNew.frameGeometry()
cp =…

Marko
- 20,385
- 13
- 48
- 64
4
votes
1 answer
Restore previous window position on buffer switch in Emacs
I split windows to view two different parts of the selected buffer simultaneously. If I switch to another buffer in one of the windows and then switch back to the original buffer, I'll lose the previous window position---I'll see the same parts of…

viam0Zah
- 25,949
- 8
- 77
- 100
4
votes
2 answers
How can I programmatically determine the size of my desktop?
I'm trying to save / restore the window size, state and position of a System::Windows::Forms::Form and want to make sure that if the window was previously on another monitor and the app is started up when only a snogle monitor is available, that it…

Jon Cage
- 36,366
- 38
- 137
- 215
3
votes
4 answers
Constraining window position to desktop working area
I want to allow a user to drag my Win32 window around only inside the working area of the desktop. In other words, they shouldn't be able to have any part of the window extend outside the monitor(s) nor should the window overlap the taskbar.
I'd…

simplecoder
- 81
- 3
- 6
3
votes
4 answers
Adobe Air - Flash - Initial window position
I'm designing a desktop app with Adobe Flash CS6, using air 3.2 for desktop (in flash target setting). In air settings, there's an advanced tab which makes it possible to set the initial value for the position of the app's window. I don't know how I…

Milad
- 1,239
- 3
- 19
- 37
3
votes
5 answers
What do iPhone, iPad and Windows Phone apps deploy as?
My understanding is that Android apps all compile and build into APK files, which are like executable JARs. These are the files that Android developers host up on the Android Marketplace and that get downloaded by users at point of sale.
What are…

IAmYourFaja
- 55,468
- 181
- 466
- 756
2
votes
2 answers
How to move C# Console Application window to the center of the screen
I'm working with a C# Console Application. How can I move the application window to the center of the screen?
Additional details
Framework version: .NET Core 3.1
Size of the window: 37x20 (Console.SetWindowSize(37, 20);)

UltraStudioLTD
- 300
- 2
- 14
2
votes
2 answers
Questions regarding GetWindowPlacement return data
I'm a bit unsure of the meaning of some of the return values from a call to the GetWindowPlacement() function, so I'd like your help, please.
I'll be calling this to obtain the normal dimensions of a hidden window.
First, where do the values of the…

Amby131
- 81
- 1
- 6
2
votes
2 answers
Qt MainWindow Position in Linux
I have a situation where my main window opens in the upper left of the monitor, only under linux. It looks quite strange, especially when a informational popup appears at program start, that is properly centered where mainwindow is on Mac and…

Jocala
- 243
- 1
- 4
- 16
2
votes
2 answers
Win32 prevent window "snap"
How can I disable the snap feature of Windows 7 for my application (progmatically)? Or is there any way to detect if the application has been snapped, and specifically call an API function to unsnap it?
Calling SetWindowPos() or ShowWindow() does…

Keyboard Chimp
- 58
- 6
2
votes
1 answer
In XMonad, how can I always give a certain window a specific floating position?
The title is pretty self-explanatory I think.
In XMonad, how can I always give a certain window a specific floating position?
james@computron ~ $ xwininfo
xwininfo: Please select the window about which you
would like information by…

We Are All Monica
- 13,000
- 8
- 46
- 72
1
vote
0 answers
Windows restore position sometimes doesn't work
I wrote a simple C# program that saves the locations and sizes of open windows to a file, and then can also restore them from that file (based on command-line arguments). This always works for some programs and not for others, and I don't know…

radumanolescu
- 4,059
- 2
- 31
- 44