Sign in to follow this  
Followers 0
Alexxander

Gui position ?

4 posts in this topic

hi all

how can i make the gui at the right down corner of the screen ?

so what ever the screen resulotion or the pc is it will be always on the right down corner

 


Share this post


Link to post
Share on other sites



Something like this, based on the size of your gui?

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>


GUICreate("Test", 300, 300, @DesktopWidth - 300, @DesktopHeight - 300)
GUISetState(@SW_SHOW)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
        EndSwitch
    WEnd

GUIDelete()
1 person likes this

When you're dead, you don't know you're dead - it's only difficult for those that know you. It's the same way when you're stupid...

My Scripts: SCCM UDFInclude Source with Compiled Script, Windows Firewall UDF

Share this post


Link to post
Share on other sites

 

Something like this, based on the size of your gui?

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>


GUICreate("Test", 300, 300, @DesktopWidth - 300, @DesktopHeight - 300)
GUISetState(@SW_SHOW)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
        EndSwitch
    WEnd

GUIDelete()

 

perfect thanks


Share this post


Link to post
Share on other sites

I use something like this in several of my scripts.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 261, 164)
;Gets the Control ID of the taskbar.
$aTaskbar = WinGetPos("[CLASS:Shell_TrayWnd]", "")
;Gets the position and size of $MainForm
$aWin = WinGetPos($Form1)
;moves the form above the clock on the task bar.
WinMove($Form1, "", @DesktopWidth - $aWin[2] - 4, @DesktopHeight - $aWin[3] - $aTaskbar[3] - 4)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

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