I don't see the point of the AutoSize parameter, it does nothing, window remains at initial size.
Are you sure?. The last column moves out of the GUI rectangle In Windows 2000 & XP for me!
You are right, without it, the rightmost controls are slightly truncated in my test case. Not obvious on first sight, but now that you mention it... :-)
With more images, they become smaller. I tried add the capability to resize the window, but to avoid resizing everything in real time, I activate the re-tiling with a hotkey:
;~ ImageFilePath = %1%
ImageFilePath = Images
IfEqual, ImageFilePath,, SetEnv,ImageFilePath,%A_WinDir%
Gui, Margin, 0, 0
Gui +Resize
pictOpt = x+1 w90 h-1 +0xCF0000 -0x80000 gSelect
Loop, %ImageFilePath%\*.bmp
Gui, Add, Picture, %pictOpt%, %A_LoopFileLongPath%
Loop, %ImageFilePath%\*.png
Gui, Add, Picture, %pictOpt%, %A_LoopFileLongPath%
Loop, %ImageFilePath%\*.jpg
Gui, Add, Picture, %pictOpt%, %A_LoopFileLongPath%
Loop, %ImageFilePath%\*.gif
Gui, Add, Picture, %pictOpt%, %A_LoopFileLongPath%
Gui, Show, w640 h700 +Hide
Gosub #c
Return
Select:
MouseGetPos,,,,ClassNN,1
GuiControlGet, FileName,, %ClassNN%
DllCall( "SystemParametersInfo", Int,20, Int,0, Str,FileName, Int,1 )
Return
#c::
Gui +LastFound
DllCall( "TileWindows", uInt,WinExist(), Int,1, Int,0, Int,0, Int,0 )
Gui, Show, AutoSize, Hot Wallpaper Selector! Click on a thumbnail to select!
Return
GuiClose:
GuiEscape:
ExitApp
But the controls might get a bit overlapped when too small.