Jump to content
Sign in to follow this  
BlazerV60

Hiding icons/toolbar in an explorer window

Recommended Posts

Hello everyone!

I'm working on a GUI that has 2 explorer windows embedded inside of it.

Eventually I'm going to put 4 explorer windows inside of the GUI since it's convenient to have 1 program opened with 4 explorer windows embedded inside it, than having 4 seperate explorer windows opened.

Anyway, I ran into some space problems. I'm trying to remove the icons/toolbar that appears on top of the explorer windows since they take up so much space. Here's a pic of what I mean:

 

BGiNmrm.png?1

Here's my code:

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

Opt("WinTitleMatchMode", 4) 

Global $hMigration, $hExplHolder, $hExplorer, $hExplorer2, $sStartDir = "C:\"
Global $iWidth = 800, $iHeight = 400

;Create the Explorer GUI
$hExplHolder = GUICreate("Explorer", $iWidth, $iHeight, Default, Default)


Run('explorer.exe /n, "' & $sStartDir & '"')
WinWait("[CLASS:CabinetWClass]") ;Wait until the window appears
WinSetState("[CLASS:CabinetWClass]","",@SW_HIDE)
WinMove($hExplorer, "", 0, 0, 400, 400)
$hExplorer = WinGetHandle("[CLASS:CabinetWClass]")


Run('explorer.exe /n, "' & $sStartDir & '"')
WinWait("[CLASS:CabinetWClass]") ;Wait until the window appears
WinSetState("[CLASS:CabinetWClass]","",@SW_HIDE)
WinMove($hExplorer2, "", 400, 0, 400, 400)
$hExplorer2 = WinGetHandle("[CLASS:CabinetWClass]")


;WinSetState($hExplorer, "", @SW_HIDE)
;WinMove($hExplorer, "", 0, 0, 400, 400)


;WinSetState($hExplorer2, "", @SW_HIDE)
;WinMove($hExplorer2, "", 400, 0, 400, 400)


_WinAPI_SetParent($hExplorer, $hExplHolder) ;Puts the explorer window inside the GUI
_WinAPI_SetWindowLong($hExplorer, $GWL_STYLE, -1064828928) ;Minuses the x button in the windows explorer (I think?)

_WinAPI_SetParent($hExplorer2, $hExplHolder) ;Puts the explorer window inside the GUI
_WinAPI_SetWindowLong($hExplorer2, $GWL_STYLE, -1064828928) ;Minuses the x button in the windows explorer (I think?)

ControlListView($hExplorer, "", "[CLASS:SysListView32; INSTANCE:1]", "ViewChange", "list")
ControlListView($hExplorer2, "", "[CLASS:SysListView32; INSTANCE:1]", "ViewChange", "list")

$hList = GUICtrlCreateListView ("File", $iWidth + 4, 4, 292, 200, 0x0003 + 0x0008 + 0x0004)
GUICtrlSetState (-1, 8)

WinSetState($hExplorer, "", @SW_SHOW)
WinSetState($hExplorer2, "", @SW_SHOW)

GUISetState(@SW_SHOW, $hExplHolder)


While 1
   $msg = GUIGetMsg()
   Switch $msg
      Case -3
         Exit
      Case -13
         GUICtrlCreateListViewItem (@GUI_DRAGFILE, $hList)
   EndSwitch
WEnd

How can I remove those top icons/toolbar so that there's more room for the file listing?

Edit: Extra props to whoever can make it so that the 2 explorer windows not do the brief flash before it disappears into the GUI.

Thanks,

Brian

Edited by BlazerV60

Share this post


Link to post
Share on other sites

1) have you tried any of these?

http://winaero.com/blog/all-the-ways-to-hide-or-show-explorer-ribbon-in-windows-8/

2) how about using an alternative file manager, which is more customizable (and way, way more usable then the built-in file manager) ? there are many really good ones.

3) also, it may be more elegant to implement a file manager in AutoIt.

Share this post


Link to post
Share on other sites

1) have you tried any of these?

http://winaero.com/blog/all-the-ways-to-hide-or-show-explorer-ribbon-in-windows-8/

2) how about using an alternative file manager, which is more customizable (and way, way more usable then the built-in file manager) ? there are many really good ones.

3) also, it may be more elegant to implement a file manager in AutoIt.

 

Thanks, after reading on the url you just gave me, I figure that I can try making the program perform a Ctrl+F1 press in each window, since that command will hide the ribbon.

I want to eventually make my program look like this:

5qW3K9Z.png?1

Since I have to always move files from one folder to another at work. It can get really messy when I have 4 different explorer windows opened. So I just want to deal with 1 window.

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  

  • Similar Content

    • By newbie2019
      Cannot find example how to locate taskbar icon coordinates or position by window handle.
      I want to use PixelChecksum to check only rectangle area over specified taskbar item.
      Please help.
      What I already have found and succesfully run for whole taskbar area:
      $taskbar = WinGetHandle("[Class:Shell_TrayWnd]") $taskbarPos = WinGetPos($taskbar) $tasklistPos = ControlGetPos($taskbar, "", "[CLASS:MSTaskListWClass; INSTANCE:1]")  $iOldCheckSum = PixelChecksum($taskbarPos[0] + $tasklistPos[0], $taskbarPos[1] + $tasklistPos[1], $taskbarPos[0] + $tasklistPos[2], $taskbarPos[1] + $tasklistPos[3]);
      I know also that I can pass window handle as parameter to PixelChecksum, but don't know how to do this with taskbar icon.
       
      Also I was able to find something similar but seems outdated: WatchWindows

      __
      thanks in advance
    • By yffulf
      Is there probably a way to click ie popup button and hide or invisible popup button in the same time?
      I try to use WinSetState @SW_hide ,
      the result is ie crashing or no response because button hide and the next click command won't work...
      $oForm=_IEFormGetObjByName($oIE,"form1") $obutton=_IEFormElementGetObjByName($oForm,"btn_OK") $hWnd = _IEPropertyGet($oIE, "hwnd") _IEAction($obutton,"focus") ControlSend($hWnd, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{Enter}") WinWait("", "確定存檔嗎?") WinSetState("","確定存檔嗎?",@SW_Hide) ControlClick("", "確定存檔嗎?", "[CLASS:Button; TEXT:確定; Instance:1;]")  
    • By KaFu
      ICU - Icon Configuration Utility

      Current Version: v6 (2018-Sep-16)
      Restore your desktop when the icons get "rearranged".
      Melba23 and I found we were working on very similar ideas to restore the Desktop icons to their normal place if they became "rearranged" (
      ). Vista seems to like this doing on occasion just for fun - but we all know some apps and games which change the display resolution or move icons around. This annoys "tidy" people who like their desktops arranged "just so" - I am particularly thinking of this desktop when I say that!
      We combined efforts and here is the result of our labors.
      Operation is easy - press "Save" to store a particular configuration and "Restore" to reset the icons to the saved positions in the selected configuration file. "Delete" allows you to remove unwanted configuration files from the list. There is a command line option so that the restoration can be run via HotKeys if required (that is why the script warns that it should be compiled for full functionality). You can decide what to do with any icons that have been added since you last saved the configuration file - the default is to put them in the top-left corner, but you can also banish them way off-screen or, more sensibly, specify a location for them.
      A new feature as of ICU v3.4 is the optional Desktop Contextmenu Integration (DCI) for Win7 (Win7 only because Microsoft implemented an easy way to do this through the registry as of this release).
      Version 3.3 should fix the empty save file bug
      Version 3.4 Win7: Admin rights no longer needed for DCI
      Version 5.0 Win8 compatibility for DCI
      The source and executable can be downloaded from my site: http://www.funk.eu
      Kudos to Ascend4nt, Melba23, Prog@ndy, & Valik for parts of the code.
      Please let me know if you found some piece of code in the source for which I forgot to mention a credit.
      Enjoy, let me know what you think of ICU and with Best Regards
    • By mar3011
      Hey, I have a problem I tried to look for it but it didn't solve the problem, I can't add an icon to the exe, I already know there were such topics I tried to all add exclusion C: \ Users \ Marcin \ AppData \ Local \ AutoIt v3 \ aut472.tm.exe to antivirus but after compilation, the name of the file changes, I uninstalled the anti-virus, but it didn't works, except that when I add the example icons from AutoIT it works, I downloaded icons using Firefox Developer Edition also don't works, just the downloaded graphics don't works also. Is there any solution to this problem?  
    • By kneze
      Hi
      script read path to pst files from registry and write this informations to txt file. Unfortunately there are stored not needed lines: path  to ost file, other line has string IndexAvailableBodyand first line is blank. How can i remove anything from txt file exept path to pst files ? 
      Thanks in advance!
      #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <DateTimeConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <array.au3> #include <IE.au3> #include <WinAPIFiles.au3> #include <FileConstants.au3> #include <File.au3> #include <GUIListBox.au3> #include <Date.au3> $Form2 = GUICreate("Form1", 405, 294, 633, 264) $Button1 = GUICtrlCreateButton("Button1", 72, 48, 113, 33) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 _searchPSTFiles() EndSwitch WEnd FUNC _searchPSTFiles() Global $aLines ;$sFileName = @ScriptDir & "\Pst.txt" $sFileNameTMP = @ScriptDir & "\Psttmp.txt" ;IF FileExists ($sFileName) then FileDelete ($sFileName) IF FileExists ($sFileNameTMP) then FileDelete ($sFileNameTMP) ;$logpathpst = FileOpen($sFileName, $FO_OVERWRITE) $logpathpsttmp = FileOpen($sFileNameTMP, $FO_OVERWRITE) Local $Outlookpst[30] For $i = 1 To 30 $Outlookpst[$i] = RegEnumVal("HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Search\", $i) If @error <> 0 Then ExitLoop If $Outlookpst = "" Then ContinueLoop EndIf FileWrite($logpathpstTMP, @CRLF & $Outlookpst[$i]) Next ;FileClose ($sFileName) FileClose ($sFileNameTMP) EndFunc  
×
×
  • Create New...