window-position

Win32 prevent window “snap”

扶醉桌前 提交于 2021-01-28 07:43:26
问题 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 not unsnap it correctly *(SW_MAXIMIZE does). Calling SetWindowPos() actually causes strange behavior in future calls to SetWindowPos() and MoveWindow(). The same inconsistencies do not apply to a window that is maximized. 回答1: I figured out a way to

SetWindowPos failing to bring windows to front in Windows 8 when Windows 8 apps are running

时光总嘲笑我的痴心妄想 提交于 2020-01-06 07:14:11
问题 I have a chat application written in VB.net. It uses SetWindowPos function to set the window to top when a new chat message is received. It works fine also.But in windows 8 it will not bring the window to front when windows 8 apps like reader or photo is running.These apps will be running with full screen mode in Windows 8. So my chat application windows is not appearing at the top when popup occurs. So how can i make it to appear even when these windows 8 apps are running in full screen mode

window popup blocker issue

笑着哭i 提交于 2020-01-05 08:44:40
问题 I am using the below script to popup a coupon window automatically. However, Chrome and other browsers are blocking the popup, as expcected. Is there a way to avoid this from being blocked by the pop-up blocker? Also, how do I center it? Code: <SCRIPT LANGUAGE="JavaScript"> <!-- function GetCookie(name) { var arg=name+"="; var alen=arg.length; var clen=document.cookie.length; var i=0; while (i<clen) { var j=i+alen; if (document.cookie.substring(i,j)==arg) return "here"; i=document.cookie

window popup blocker issue

…衆ロ難τιáo~ 提交于 2020-01-05 08:44:29
问题 I am using the below script to popup a coupon window automatically. However, Chrome and other browsers are blocking the popup, as expcected. Is there a way to avoid this from being blocked by the pop-up blocker? Also, how do I center it? Code: <SCRIPT LANGUAGE="JavaScript"> <!-- function GetCookie(name) { var arg=name+"="; var alen=arg.length; var clen=document.cookie.length; var i=0; while (i<clen) { var j=i+alen; if (document.cookie.substring(i,j)==arg) return "here"; i=document.cookie

Keep form open when clicking on another application

时光总嘲笑我的痴心妄想 提交于 2019-12-25 17:49:13
问题 I've got an application that I'm trying to use as a keyboard to type special characters. It currently has this function (not my code!): Protected Overrides ReadOnly Property CreateParams() As CreateParams Get Dim baseParams As CreateParams = MyBase.CreateParams Const WS_EX_NOACTIVATE As Integer = &H8000000 Const WS_EX_TOOLWINDOW As Integer = &H80 baseParams.ExStyle = baseParams.ExStyle Or CInt(WS_EX_NOACTIVATE Or WS_EX_TOOLWINDOW) Return baseParams End Get End Property This makes it so the

Move other windows on Mac OS X using Accessibility API

老子叫甜甜 提交于 2019-12-18 10:21:37
问题 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 having difficulties doing this since this is day one of programming in Objective-C for me. Here is what I am doing right now. First, I find the list of windows and their PIDs using CGWindowListCopyWindowInfo . Then, for each window I use

Check if currently minimized window was in maximized or normal state at the time of minimization

 ̄綄美尐妖づ 提交于 2019-12-10 13:38:34
问题 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; Properties.Settings.Default.Size = RestoreBounds.Size; Properties.Settings.Default.IsMaximized = ...; // How do I know if the window would be restored to maximized? } I want to make the position and state of my window persistent using the application

Constraining window position to desktop working area

▼魔方 西西 提交于 2019-12-07 19:41:17
问题 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 like to do it in a way that does cause any stuttering. Handling WM_MOVE messages and calling MoveWindow() to reposition the window if it goes off works, but I don't like the flickering effect that's caused by MoveWindow(). I also tried handling WM

Constraining window position to desktop working area

瘦欲@ 提交于 2019-12-06 00:16:24
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 like to do it in a way that does cause any stuttering. Handling WM_MOVE messages and calling MoveWindow() to reposition the window if it goes off works, but I don't like the flickering effect that's caused by MoveWindow(). I also tried handling WM_MOVING which prevents the need to call MoveWindow() by altering the destination rectangle before the move

How to get and set the window position of another application in C#

若如初见. 提交于 2019-11-26 16:06:18
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 to achieve this? I actually wrote an open source DLL just for this sort of thing. Download Here This will allow you to find, enumerate, resize, reposition, or do whatever you want to other application windows and their controls. There is also added functionality to read and write the values/text of the windows/controls and do click events on them.