powerjuce Posted April 27, 2008 Posted April 27, 2008 hey all , i am new to this and i hav a problem with this code. I cannot get the window to resize(like clicking near the edge and making it bigger) here is the code expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.10.0 Author: PowerJuce Script Function: #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here Opt("GUIOnEventMode", 1) ; Change to OnEvent mode ;Opt("GUICloseOnESC", 0); disable ESC to exit Opt("TrayMenuMode", 1); disable tray menu Opt("TrayOnEventMode", 1); enable tray events Opt("RunErrorsFatal", 0); don't crash out Opt("TrayIconHide", 1); don't show icon Opt("GUIResizeMode", 1) #include <GUIConstants.au3> #cs----------------------------------------- - All Variable will Go here - #ce----------------------------------------- Dim $mainwindow, $width, $height, $left, $top #cs----------------------------------------- - End Variables List - #ce----------------------------------------- GetOldPositions() LoadGUI() While 1 Sleep(1000) WEnd #cs --------------------------------------------------- - - - This is where all the functions go - - - #ce---------------------------------------------------- Func GetOldPositions() if FileExists(@ScriptDir & "\Data\positions.ini") Then $width = IniRead(@ScriptDir & "\Data\positions.ini", "Size", "width", "550") $height = IniRead(@ScriptDir & "\Data\positions.ini", "Size", "height", "330") $left = IniRead(@ScriptDir & "\Data\positions.ini", "position", "left", "-1") $top = IniRead(@ScriptDir & "\Data\positions.ini", "position", "top", "-1") Else $width = 550 $height = 330 $left = -1 $top = -1 EndIf EndFunc Func LoadGUI() $mainwindow = GUICreate("FolderLocker", $width, $height, $left, $top, -1 + 0x00040000 + 0x00080000,0x00000018 + -1) GUISetOnEvent($GUI_EVENT_CLOSE, "CloseWindow") GUISwitch($mainwindow) GUISetState(@SW_SHOW) _ReduceMemory() EndFunc Func CloseWindow() $size = WinGetPos("FolderLocker") $width = $size[2] $height = $size[3] $left = $size[0] $top = $size[1] IniWrite(@ScriptDir & "\Data\positions.ini", "position", "left", $left) IniWrite(@ScriptDir & "\Data\positions.ini", "position", "top", $top) IniWrite(@ScriptDir & "\Data\positions.ini", "Size", "width", $width) IniWrite(@ScriptDir & "\Data\positions.ini", "Size", "height", $height) Exit EndFunc ; Reduce memory usage ; Author wOuter ( mostly ) Func _ReduceMemory($i_PID = -1) If $i_PID <> -1 Then Local $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $i_PID) Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_Handle[0]) DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $ai_Handle[0]) Else Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1) EndIf Return $ai_Return[0] EndFunc;==> _ReduceMemory() any and all help will be welcome
Zedna Posted April 27, 2008 Posted April 27, 2008 add $WS_SIZEBOX style to your GUI window: GUICreate("Test GUI",500,500,-1,-1,BitOR($GUI_SS_DEFAULT_GUI,$WS_SIZEBOX)) and don't forget to delete your duplicit posts. Resources UDF ResourcesEx UDF AutoIt Forum Search
powerjuce Posted April 27, 2008 Author Posted April 27, 2008 (edited) and don't forget to delete your duplicit postshow? Edited April 27, 2008 by powerjuce
GEOSoft Posted April 27, 2008 Posted April 27, 2008 (edited) how?Open the threads and click the Delete button (beside Edit) at the bottom of the post.Edit. Creating duplicate posts will not get help any faster. Somedays it just doesn't happen that there is someone with the correct answer sitting at your beck and call to provide you with a solution. Edited April 27, 2008 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
powerjuce Posted April 27, 2008 Author Posted April 27, 2008 Open the threads and click the Delete button (beside Edit) at the bottom of the post.There is no edit or delete buttonCreating duplicate posts will not get help any faster. Somedays it just doesn't happen that there is someone with the correct answer sitting at your beck and call to provide you with a solution.I did not mean to, i created the first post, but the page expired(but the topic had been posted), and then i clicked post again(it posted), but the page expired, and when i hit post the third time i finally was posted and then i saw that there were two more posts (tat were mine)sorry for the inconvience
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now