Sign in to follow this  
Followers 0
Rad

Resize my window without automatically moving EVERYTHING

5 posts in this topic

#1 ·  Posted (edited)

It ruined my window when I did WinMove() to resize it, I want it so you click a button and a little menu (that is attached to the GUI) disappears. This way you can hide it then pull it out... Only when I resize it to just after that button, everything scrunches up into each other ;)

How do I disable this? If I cant then I just spent the last hour making about 15 different buttons that wont get any use :whistle:

edit~ I dont know where you put this kind of thing and its not very big, but I think its neat :P Put it in misc.au3 or in another include, then when you click on a control run this and the window will pan just like your holding the top menu until you release the mouse

;===============================================================================
;
; Description:      Allows window to be panned around until mouse is released
; Syntax:           _PanWindow($sTitle, [$sText])
; Parameter(s):     $sTitle             - Title of the window
;                   $sText              - Text of the window
; Requirement(s):   Requires #Include <Misc.au3>
; Return Value(s):  None
; Author(s):        Rad (RadleyGH at GMail dot com)
; Note(s):          This should be 
;
;===============================================================================
Func _PanWindow($sTitle, $sText = "")
    Local $Mouse = MouseGetPos(), $Win = WinGetPos($sTitle, $sText), $Offset[2], $tempMouse, $tempWin
    $Offset[0] = $Mouse[0] - $Win[0]
    $Offset[1] = $Mouse[1] - $Win[1]
    Do
        Sleep(10)
        $tempMouse = MouseGetPos()
        WinMove($sTitle, $sText, $tempMouse[0] - $Offset[0], $tempMouse[1] - $Offset[1])
    Until _IsPressed("01") = 0
    Return
EndFunc
Edited by Rad

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Why not just use ControlHide?

I've done window resizing quite a bit, If I'm not to un-sober later, I'll look to see what UDF's I've made to do this, otherwise... :whistle: gl.

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I really need a way to disable the auto repositioning!

This is driving me crazy!

The way I did my buttons I can only have one GUI, and if i expand the area of the GUI this happens:

Posted ImagePosted Image

:whistle:

Edited by Rad

Share this post


Link to post
Share on other sites

$GUI_DOCKALL

GENIOUS! thank you so much!

Share this post


Link to post
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
Sign in to follow this  
Followers 0