fusor Posted March 31, 2008 Share Posted March 31, 2008 Hi all, Just little question for fun, It is possible to center dialogbox to the screen with function "FileOpenDialog" or "FileSaveDialog" tks, fuzzz Link to comment Share on other sites More sharing options...
Xenobiologist Posted March 31, 2008 Share Posted March 31, 2008 Hi, search for FileDialogsEx.au3 it works. Mega P.S.: Or do a WinMove Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
fusor Posted March 31, 2008 Author Share Posted March 31, 2008 Tks Xenobiologist, It's an #include ? where is this au3 ? Link to comment Share on other sites More sharing options...
Xenobiologist Posted March 31, 2008 Share Posted March 31, 2008 Hi,I tried this one : http://www.autoitscript.com/forum/index.ph...penDialogEx.au3Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
fusor Posted March 31, 2008 Author Share Posted March 31, 2008 Hi,I tried this one : http://www.autoitscript.com/forum/index.ph...penDialogEx.au3MegaNot found on this include ... nothing for center dialog window. an other idea? Link to comment Share on other sites More sharing options...
ResNullius Posted March 31, 2008 Share Posted March 31, 2008 Not found on this include ... nothing for center dialog window. an other idea?Try this by /dev/nul :_MoveFileOpenDialog() Link to comment Share on other sites More sharing options...
Xenobiologist Posted March 31, 2008 Share Posted March 31, 2008 (edited) Hi, I did this: expandcollapse popup#include<WinAPI.au3> #include<WindowsConstants.au3> #include<FileDialogsEx.au3> ; _FileDialogsEx.au3 example #1: ; create big resizeable file open dialog, defaulting to thumbnails view ; demonstrates how to set size/position of dialog window, how to set default view mode for listview. Global $f_CDN_Start = 1 $Return = _FileOpenDialogEx("Open picture", @WindowsDir & "\Web\Wallpaper", "All Files (*.*)", BitOR($OFN_ENABLESIZING,$OFN_ALLOWMULTISELECT), "", 0, "_OFN_HookProc") If @error Then ConsoleWrite('No file selected.' & @CRLF) Else ConsoleWrite($Return & @CRLF) EndIf Func _OFN_HookProc($hWnd, $Msg, $wParam, $lParam) Switch $Msg Case $WM_NOTIFY Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR $tNMHDR = DllStructCreate("hwnd hWndFrom;int idFrom;int code", $lParam) $hWndFrom = DllStructGetData($tNMHDR, "hWndFrom") $iIDFrom = DllStructGetData($tNMHDR, "idFrom") $iCode = DllStructGetData($tNMHDR, "code") Switch $iCode Case $CDN_INITDONE Case $CDN_FOLDERCHANGE If $f_CDN_Start Then;if executing first time Local $hODLV = _FindWindowEx($hWndFrom, 0, "SHELLDLL_DefView", "") If $hODLV <> 0 Then DllCall('user32.dll','int','SendMessage','hwnd',$hODLV,'uint',$WM_COMMAND,'wparam',$ODM_VIEW_THUMBS,'lparam',0) EndIf WinMove($hWndFrom, "", 100,100, 800,600, 0) ; CHANGE!!! HERE!!! $f_CDN_Start = 0;to make sure these tweaks happens only once. EndIf Case $CDN_SELCHANGE Case $CDN_FILEOK EndSwitch Case Else EndSwitch EndFunc Func _FindWindowEx($hWndParent,$hWndChildAfter,$sClassName,$sWinTitle="") Local $aRet = DllCall('user32.dll','hwnd','FindWindowEx', 'hwnd', $hWndParent,'hwnd',$hWndChildAfter,'str',$sClassName,'str',$sWinTitle) If $aRet[0] = 0 Then ConsoleWrite('_FindWindowEx() Error : ' & _WinAPI_GetLastErrorMessage()) Return $aRet[0] EndFunc Exit Look at : WinMove($hWndFrom, "", 100,100, 800,600, 0) ; CHANGE!!! HERE!!! Mega Edited March 31, 2008 by Xenobiologist Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
fusor Posted March 31, 2008 Author Share Posted March 31, 2008 Many tks ResNullius & Xenobiologist. It's work fine Link to comment Share on other sites More sharing options...
rasim Posted April 1, 2008 Share Posted April 1, 2008 fusorOr just modify this example. Use WinMove() func. instead of WinSetOnTop() func. Link to comment Share on other sites More sharing options...
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