Timeline for How do I lock the size and position of an external application?
Current License: CC BY-SA 4.0
Post Revisions
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 14 at 8:42 | answer | added | winscripter | timeline score: 0 | |
| Mar 13 at 18:09 | comment | added | Wyck | Also similar to Open Windows' Calculator in my C# Win Application? | |
| Mar 13 at 18:05 | comment | added | Wyck | How to load another process' window as a child window? has a bunch of comments with related links. I'll link importantly: Good or evil - SetParent() win32 API between different processes | |
| Mar 13 at 17:56 | comment | added | Wyck | I suggest changing the title to "How do I set the size and position of an external application's window?" or "How do I prevent an external application's main window from being moved or resized?" (These seem like different problems to me as well.) | |
| Mar 13 at 15:04 | history | edited | Uwe Keim | CC BY-SA 4.0 |
Removed tags from title
|
| Mar 12 at 12:48 | answer | added | Frank_J | timeline score: -1 | |
| Mar 12 at 12:32 | comment | added | JonasH | I'm not sure what you mean by "open external applications within my own WinForms application". Windows have APIs for interacting with windows of other applications, but not all APIs are available in .Net So you will need to be very comfortable with the win32 API and P/Invoke if you want to do this yourself. I also imagine that it will be quite difficult to make this both easy to use and reliable. | |
| Mar 12 at 12:13 | comment | added | Panagiotis Kanavos | The PowerToys code is hosted on Github. You can check the code of eg the WorkspacesWindowArranger class or WindowsCreationHandler. Not only do they modify other app windows (using SetWindowPlacement, SetWindowsPos) but also listen for show/hide events so they can modify those "new" windows | |
| Mar 12 at 12:09 | comment | added | Panagiotis Kanavos |
It sounds like you want snapping which is already available on Windows and customizable by Windows. Or utilities like Windows PowerToys Workspaces or FancyZones, which work on top of Windows features. You can't just lock another application's location and size. SetWindowsPos isn't enough - that API goes back to Windows 9x and doesn't handle the newer features
|
|
| Mar 12 at 12:06 | comment | added | Sinatr | Related. | |
| Mar 12 at 11:48 | history | asked | CraftyMaelyss | CC BY-SA 4.0 |