Sign in to follow this  
Followers 0
CodyBarrett

Folder view - Classic

12 posts in this topic

well... i know some stupid kids who like to delete things.... and im making a program that has a sys hidden folder.. in another sys hidden folder inside..ect... all in all 10 folders.. then there is the main folder.. im making a program that opens the 10th folder...but im having troubles with hiding some of the windows explorer controls... i have everything all good.. except the stuff on the left side... it shows which folder the current one is in.. i can't allow that.. so is there a way to hide that? or is there a way to change the folder view to classic?

i have searched

results = 0 that relate to my problem... i googled it (just to show im not lazy) and all i found were step by step guides to change it to classic... i KNOW how.. just not how to automaticaly do it without bringing up the folder options window... or would i have to?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Win+Pause -> advanced -> settings (performance) -> uncheck "Use common tasks in folders".

Don't know for Vista.

Edit: ...and what about the path bar? want to remove that too?

Edited by Authenticity

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

is there like a regkey to edit?.... i know i could probably use control click for everything.. but the users would see what was happening wouldn't they?

edit

i already have everything... the back & forwards buttons.. pathbar..ect. all are hidden.. i changed the title just in case.. most computers use the current.. but can't be too careful

the thing thats giving me grief is the left hand side of the screen... doesn't seem to be a control there

Edited by CodyBarrett

Share this post


Link to post
Share on other sites

#include <WindowsConstants.au3>
#include <SendMessage.au3>
#include <WinAPI.au3>

$hExplorer = WinGetHandle("[Class:ExploreWClass]")
$hTree = ControlGetHandle($hExplorer, "", "[Class:SysTreeView32]")

While 1
    If _WinAPI_IsWindowVisible($hTree) Then
        _SendMessage($hExplorer, $WM_COMMAND, 41525, 0)
        ;_WinAPI_ShowWindow($hTree, @SW_HIDE); <--- EXTREME!!
    EndIf
    Sleep(10)
Wend

WBD

Share this post


Link to post
Share on other sites

To destroy all the path edit control:

#include <SendMessage.au3>
#include <WindowsConstants.au3>

Dim $aCabinet, $aExplore
Dim $hEdit

$aCabinet = WinList('[CLASS:CabinetWClass]')
$aExplore = WinList('[CLASS:ExploreWClass]')

For $i = 1 To $aCabinet[0][0]
    $hEdit = ControlGetHandle($aCabinet[$i][1], '', 'Edit1')
    _SendMessage($hEdit, $WM_CLOSE)
Next

For $i = 1 To $aExplore[0][0]
    $hEdit = ControlGetHandle($aExplore[$i][1], '', 'Edit1')
    _SendMessage($hEdit, $WM_CLOSE)
Next

The key to the explorer properties is probably "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer". Play around with the sub-keys, maybe you'll find it there. If no try the method above to remove the lest (or the right ,if you have RTL windows version) side.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

uhmmm alright thannks WBD ill lookinto that i have no idea how sendmessage works... and WINAPI i don't need but i can see its just an example... and BTW the example didn't do anything... but yeah ima look into _Sendmesage() how do you get the values?

edit

authenticty -> ill look into yours also..and ill check out the key.. another question... i've never seen "cabinet" before what is that?... well thats a lie i HAVE seen it.. in my kitchen.. but no TO GOOGLE!!! again :)

Edited by CodyBarrett

Share this post


Link to post
Share on other sites

I use Winspector (http://www.windows-spy.com/) to peek at the messages to the window when I choose certain menu items. Generally, WM_COMMAND messages are quite interesting. The example should work if you:

[1] Start an explorer window (e.g. [Win]+E)

[2] Run the script

[3] Try and turn folder view on

WBD

Share this post


Link to post
Share on other sites

im still having difficulties...

#1 winapi doesn't do what i need.. and it has a function for mostly everything

#2 there isn't a control there to hide

#3 i tried controlclick "Tools" Controlclick "Folder options" ControlClick "Classic".... but it didn't work at all.... the Tools.. in the menu doesn't seem to have its own control

#4 not even sure how DLL's work so i don't want to venture into that area

Share this post


Link to post
Share on other sites

bump

any more ideas? because im still having troubles hiding the left hand side...

Share this post


Link to post
Share on other sites

Global $sKey, $sShellState, $sWebView
Global $xShellState ; $sKey
Global $iWebView ; $sKey & '\Advanced'

$sKey = 'HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer'
$sShellState = 'ShellState' ; REG_BINARY
$sWebView = 'WebView' ; REG_DWORD

$xShellState = RegRead($sKey, $sShellState)

$xShellState = BinaryMid($xShellState, 1, 5) & _
             StringFormat('%02x', BitAND(BinaryMid($xShellState, 6, 1), BitNOT(0x20))) & _
             StringTrimLeft(BinaryMid($xShellState, 7), 2)

RegWrite($sKey, $sShellState, 'REG_BINARY', $xShellState)
RegWrite($sKey & '\Advanced', $sWebView, 'REG_DWORD', 0)

Share this post


Link to post
Share on other sites

Code(Authenticity) + Code(This) = Solution(For CodyBarrett)

:)

$Opt = Opt('WinSearchChildren', 1)

Global $sKey, $sShellState, $sWebView
Global $xShellState ; $sKey
Global $iWebView ; $sKey & '\Advanced'

$sKey = 'HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer'
$sShellState = 'ShellState' ; REG_BINARY
$sWebView = 'WebView' ; REG_DWORD

$xShellState = RegRead($sKey, $sShellState)

$xShellState = BinaryMid($xShellState, 1, 5) & _
               StringFormat('%02x', BitAND(BinaryMid($xShellState, 6, 1), BitNOT(0x20))) & _
               StringTrimLeft(BinaryMid($xShellState, 7), 2)

RegWrite($sKey, $sShellState, 'REG_BINARY', $xShellState)
RegWrite($sKey & '\Advanced', $sWebView, 'REG_DWORD', 0)

Global $List = WinList('[CLASS:SHELLDLL_DefView]')

For $i = 1 To UBound($List) - 1
    DllCall('user32.dll', 'long', 'SendMessage', 'hwnd', $List[$i][1], 'int', 0x0111, 'int', 0x7103, 'int', 0)
Next

Share this post


Link to post
Share on other sites

THANK YOU! that worked haha.. now to understand what just happened... :)

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  
Followers 0