简体   繁体   中英

Cocoa: Get frontmost window of active application

How can I get the NSWindow object from the frontmost application? What I'm trying to do is a SizeUp, so from my app I could resize the frontmost window of any app.

You can't get an NSWindow from another app. You might be able to resize a window of another app using accessibility APIs, if the user has enabled access for assistive devices in the Universal Access preferences.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM