This App is No Longer Maintained. Visit the Replacement at StrokesPlus.net

StrokesPlus Forum
                       
StrokesPlus Forum
Home | Profile | Active Topics
Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General Discussion
 General Discussion
 Resize window beyond desktop dimensions
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

lujomu

9 Posts

Posted - 08/14/2015 :  02:34:42  Show Profile
I have an application window with a huge menu/toolbar on top, that is hardly ever used and occupies too much screen space for my liking. Think ribbon menu size, but unfortunately not collapsable.

So I'd like to just move the window up (by about 190 pixels) and resize it accordingly to fill the whole screen again.
Here's what I have so far:
up_shift = 190
hwndTarget = acGetOwnerWindowByPoint( gsx, gsy)

acMaximizeWindow( hwndTarget, nil, nil)

left = acGetWindowLeft( hwndTarget, nil, nil)
top = acGetWindowTop( hwndTarget, nil, nil)
right = acGetWindowRight( hwndTarget, nil, nil)
bottom = acGetWindowBottom( hwndTarget, nil, nil)
width = right - left
height = bottom - top

-- acRestoreWindow( hwndTarget, nil, nil)
acSetWindowSize( hwndTarget, nil, nil, width, height + up_shift)
acMoveWindow( hwndTarget, nil, nil, left, top - up_shift)

The window is moved up alright, but the height does not change. It seems the size of a window cannot exceed the current desktop size (even if resized by hand).

Is there a way to lift this restriction?

Thanks,
lujomu

Rob

USA
2615 Posts

Posted - 08/15/2015 :  02:24:06  Show Profile  Visit Rob's Homepage
What is the application? Or is it not something I can download?

When I use your script on Notepad, it works as expected. I'm guessing the application is responding to the WM_WINDOWPOSCHANGING / WM_GETMINMAXINFO messages which tells Windows how big (or small) the window can be resized.
Go to Top of Page

lujomu

9 Posts

Posted - 08/15/2015 :  02:44:56  Show Profile
Sorry, didn't consider this could be app dependent.

The program in question is the Evernote for Windows desktop client (https://evernote.com/download/get.php?file=Win). And the window I want to resize is the single note view, that shows a single note in a separate window.
Go to Top of Page

Rob

USA
2615 Posts

Posted - 08/15/2015 :  02:57:52  Show Profile  Visit Rob's Homepage
Works for me (Windows 10), however, I did uncomment your call to acRestoreWindow since a maximized window's size is only the size of the desktop workspace area.
local up_shift = 190
local hwndTarget = acGetOwnerWindowByPoint( gsx, gsy)
acMaximizeWindow( hwndTarget, nil, nil)
acDelay(100)
local left = acGetWindowLeft( hwndTarget, nil, nil)
local top = acGetWindowTop( hwndTarget, nil, nil)
local right = acGetWindowRight( hwndTarget, nil, nil)
local bottom = acGetWindowBottom( hwndTarget, nil, nil)
local width = right - left
local height = bottom - top
acRestoreWindow( hwndTarget, nil, nil)
acDelay(100)
acSetWindowSize( hwndTarget, nil, nil, width, height + up_shift)
acMoveWindow( hwndTarget, nil, nil, left, top - up_shift)
Go to Top of Page

lujomu

9 Posts

Posted - 08/19/2015 :  01:10:46  Show Profile
Just tried it again and it does not work for me. I'm still on Windows 8.1, though, so I will try it again when I upgrade to Window 10 in the next couple of weeks.

Thanks for your help, Rob!
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000