Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 509

Move Picture- Not Button

$
0
0
Hi.

This code makes a picture turn on and off on my screen when I click the button.
I want it to be able to move the picture, but want to have the button at the same place. Ort o be able to move them both independent of each other. Right now they are both fixed in the same place, and I am not able to drag neither of them to differnet places.



[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1

[MeterON-OFF]
Meter=Button
ButtonImage=#@#Images\PacButton.png
ButtonCommand=[!ToggleMeter MeterImage1][!UpdateMeter MeterImage1][!Redraw]
X=10
Y=10

[MeterImage1]
Meter=Image
ImageName=E:\_Daniel\Bild.png

X=300
Y=100
W=300
H=300
Hidden=1
Layer=0
LeftMouseDownAction=[!SetVariable StartImageX #MouseX#][!SetVariable StartImageY #MouseY#][!UpdateMeter MeterImage1][!Redraw]
MouseMoveAction=[!SetVariable OffsetImageX #(MouseX - StartImageX)#][!SetVariable OffsetImageY #(MouseY - StartImageY)#][!SetOption MeterImage1 X #(ImageX + OffsetImageX)#][!SetOption MeterImage1 Y #(ImageY + OffsetImageY)#][!UpdateMeter MeterImage1][!Redraw]

Statistics: Posted by Danwan — 35 minutes ago — Replies 0 — Views 4



Viewing all articles
Browse latest Browse all 509

Trending Articles