Jump to content

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
Link to comment
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.

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
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.

Link to comment
Share on other sites

something like this?

http://www.softwareok.com/?seite=Software/Q-Dir

if you look around, you will find several good alternatives already exist. have a look here:

http://www.portablefreeware.com/index.php?sc=9

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
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
 Share

×
×
  • Create New...