It is currently December 15th, 2019, 6:21 am

Keep on screen question

Report bugs with the Rainmeter application and suggest features.
User avatar
balala
Rainmeter Sage
Posts: 9267
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Keep on screen question

balala » October 29th, 2019, 2:59 pm

By default the skins are set to have been kept on the screen, having checked the "Keep on screen" setting.
Although I'm not using this too frequently, now I had to try this so I unchecked this setting onto a skin. I was (obviously) able to drag it outside of the screen, but the weird is that when releasing the mouse left button, if the skin is drag of screen in upper direction, it jumps back vertically to the screen. Horizontally it stays where it has been left, but vertically I can't left it outside of screen:
ezgif-2-026726af9d97.gif
The extremely simple code has nothing improper I think:

Code: Select all

[Rainmeter]
Update=1000

[MeterImage]
Meter=Image
X=0
Y=0
W=200
H=400
SolidColor=255,240,0
Why this?
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 19870
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Keep on screen question

jsmorley » October 29th, 2019, 3:18 pm

balala wrote:
October 29th, 2019, 2:59 pm
By default the skins are set to have been kept on the screen, having checked the "Keep on screen" setting.
Although I'm not using this too frequently, now I had to try this so I unchecked this setting onto a skin. I was (obviously) able to drag it outside of the screen, but the weird is that when releasing the mouse left button, if the skin is drag of screen in upper direction, it jumps back vertically to the screen. Horizontally it stays where it has been left, but vertically I can't left it outside of screen:
ezgif-2-026726af9d97.gif
The extremely simple code has nothing improper I think:

Code: Select all

[Rainmeter]
Update=1000

[MeterImage]
Meter=Image
X=0
Y=0
W=200
H=400
SolidColor=255,240,0
Why this?

Windows itself will not allow any "window" to extend above the top of the screen. This was made a rule very early in the life of Windows, to keep people from moving the "title bar" outside of a place where they can get at it with the mouse. If you were able to do so, you could no longer drag the window at all, and would be stuck. If you move a window, either by dragging, or in any code, above the top of the screen, Windows will just snap it back down. It's just one of the core, baked-in rules of Windows.
User avatar
balala
Rainmeter Sage
Posts: 9267
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Keep on screen question

balala » October 29th, 2019, 3:26 pm

jsmorley wrote:
October 29th, 2019, 3:18 pm
Windows itself will not allow any "window" to extend above the top of the screen. This was made a rule very early in the life of Windows, to keep people from moving the "title bar" outside of a place where they can get at it with the mouse. If you were able to do so, you could no longer drag the window at all, and would be stuck. If you move a window, either by dragging, or in any code, above the top of the screen, Windows will just snap it back down. It's just one of the core, baked-in rules of Windows.
Aha. And this applies to Rainmeter skins as well.
Clear, thanks for the clarifications.
User avatar
jsmorley
Developer
Posts: 19870
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Kepp on screen question

jsmorley » October 29th, 2019, 3:31 pm

balala wrote:
October 29th, 2019, 3:26 pm
Aha. And this applies to Rainmeter skins as well.
Clear, thanks for the clarifications.
Yes, a Rainmeter skin is in fact a "window".
User avatar
jsmorley
Developer
Posts: 19870
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Keep on screen question

jsmorley » October 29th, 2019, 3:47 pm

It should be noted that you CAN move a skin above the top of the screen in code, using the !Move bang. It will stay that way, as long as you don't try to drag it with the mouse. As soon as Windows detects any movement of the window, it will snap it back into view at the top.

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!Move "100" "-100"]

[Variables]

[MeterShape]
Meter=Shape
Shape=Rectangle 0.5,0.5,300,300 | StrokeWidth 1 | Stroke Color 255,255,255,255 | Fill Color 47,47,47,255
User avatar
balala
Rainmeter Sage
Posts: 9267
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Keep on screen question

balala » October 29th, 2019, 3:51 pm

jsmorley wrote:
October 29th, 2019, 3:47 pm
It should be noted that you CAN move a skin above the top of the screen in code, using the !Move bang. It will stay that way, as long as you don't try to drag it with the mouse. As soon as Windows detects any movement of the window, it will snap it back into view at the top.
Right. This way it can be done. Useful to be known.
Thanks again for all clarifications.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3645
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Keep on screen question

eclectic-tech » October 30th, 2019, 4:44 pm

Another (manual) method I have suggested in some of my creations is:

Select skin(s) using "Ctrl+Alt" key combination [highlighting them in RED], or create a "Drag Group", then use the arrow keys to position them anywhere on or off the screen (with "KeepOnScreen" deactivated). "Ctrl+Arrow" moves them quickly, or just "Arrows" for fine positioning.

This allows placing skins above the screen top as long as you do not try to drag them with your mouse.
Also, multiple skins can be moved at one time. :sly:

As always, there are many methods to achieve similar results in your skins :welcome:
User avatar
balala
Rainmeter Sage
Posts: 9267
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Keep on screen question

balala » October 30th, 2019, 4:54 pm

eclectic-tech wrote:
October 30th, 2019, 4:44 pm
Select skin(s) using "Ctrl+Alt" key combination [highlighting them in RED], or create a "Drag Group", then use the arrow keys to position them anywhere on or off the screen (with "KeepOnScreen" deactivated). "Ctrl+Arrow" moves them quickly, or just "Arrows" for fine positioning.
Thanks eclectic-tech, good idea. Just as a side note i completely forgot about the possibility to highlight skins this way. Additionally I had not even idea about the possibility of moving a this way highlighted skins. Good to find out these kind of tricks.
However the idea was not to place the skins outside of the screen, but to figure out what's going on when dragging a skin upper outside of screen, why it isn't kept there. jsmorely's explanation made me to realize the reason of this.
Thanks again anyway for the (as usually) useful idea.