Jump to content

Movable Splash or box on the screen


 Share

Recommended Posts

Hello, im a sorta noob to this.... but just need a few ideas to get me started.

My idea is that i would like to move and resive a (Solid Box) and to return the top left position and the size of the box, width and height.

i just dont know where to start.......

Please could you point me in the right direction.

Ace....

Link to comment
Share on other sites

Hello, im a sorta noob to this.... but just need a few ideas to get me started.

My idea is that i would like to move and resive a (Solid Box) and to return the top left position and the size of the box, width and height.

i just dont know where to start.......

Please could you point me in the right direction.

Ace....

GUI in the helpfile can create you a box

use the style

$WS_POPUP

looks like a splash box

Link to comment
Share on other sites

its growing....

#include <GUIConstants.au3>

$xpos=150
$ypos=150

$mypopup=GUICreate("my popup "&$xpos&" "&$ypos, $xpos,$ypos,300,300,BitAND($WS_CAPTION,$WS_POPUPWINDOW))

GUISetState()

while 1
    GUISetState()
    sleep(100)
WEnd
Link to comment
Share on other sites

Yep spot on amada, TY.

#include <GUIConstants.au3>

$xpos=150
$ypos=150

$mypopup=GUICreate("my popup", $xpos,$ypos,300,300,Bitor($WS_CAPTION,$WS_POPUPWINDOW,$WS_SIZEBOX))
$but=GUICtrlCreateButton("Pushme",20,20,50,50)

GUISetState()

while 1
    $msg = GUIGetMsg()
Select  
case $msg = $but
    $size = WinGetPos("my popup")
    
MsgBox(0, "Active window stats (x,y,width,height):", $size[0] & " " & $size[1] & " " & $size[2] & " " & $size[3])

EndSelect
WEnd

However, hanvet yet figured out how to make the co-ordinates update while dragging, any ideas please.

Link to comment
Share on other sites

Yep spot on amada, TY.

(Snip)

However, hanvet yet figured out how to make the co-ordinates update while dragging, any ideas please.

you're close

Cant display things in a msgbox though, because it pauses the script

#include <GUIConstants.au3>

$xpos=150
$ypos=150

$mypopup=GUICreate("my popup", $xpos,$ypos,300,300,Bitor($WS_CAPTION,$WS_POPUPWINDOW,$WS_SIZEBOX))
$but=GUICtrlCreateButton("Pushme",20,20,50,50)

GUISetState()

while 1
     $size = WinGetPos("my popup")  
     $msg = GUIGetMsg()
ToolTip($size[0] & ", " & $size[1] & " - " & $size[2] & "x" & $size[3], $size[0]-10, $Size[1]-10)
Select  
case $msg = $but
    $size = WinGetPos("my popup")
    
MsgBox(0, "Active window stats (x,y,width,height):", $size[0] & " " & $size[1] & " " & $size[2] & " " & $size[3])

EndSelect
WEnd
Edited by Paulie
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...