高手看过来,文件夹内容查看排列问题
本帖最后由 yangxh88 于 2010-7-27 14:25 编辑#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$oIE = ObjCreate("Shell.Explorer.2")
GUICreate("Embedded Web control Test", 640, 480, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN))
$GUIActiveX = GUICtrlCreateObj ($oIE, 10, 40, 600, 360)
GUISetState()
$oIE.navigate("D:\tools\单机游戏")
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
EndSelect
WEnd
GUIDelete()
这段代码可以浏览一个文件夹,但总是以“详细信息”排列,可否以“图标”或“列表”等方式排序,请高手指点,谢谢! 有人可以帮我看看吗?谢谢了 没人看过来。晕了。 你用IE的控件我不会,如果是用ListView的话可以的,希望达人们能帮助你 帮顶 等待高手 请看注解部分:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <GuiListView.au3>
Local $hParent,$hwnd
$oIE = ObjCreate("Shell.Explorer.2")
$hParent=GUICreate("Embedded Web control Test", 640, 480, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN))
$GUIActiveX = GUICtrlCreateObj ($oIE, 10, 40, 600, 360)
GUISetState()
$oIE.navigate("D:\tools\单机游戏")
;=========
;显示方式排列
;=========
$hwnd = ControlGetHandle($hParent, "", "SysListView321")
$flags = 0;按所需更改值,范围为0-4
Switch $flags
Case0
_GUICtrlListView_SetColumnWidth($hwnd,0,400)
_GUICtrlListView_SetView($hwnd, 0)
Case1
_GUICtrlListView_SetView($hwnd, 1)
Case2
_GUICtrlListView_SetView($hwnd, 2)
Case3
_GUICtrlListView_SetView($hwnd, 3)
Case4
_GUICtrlListView_SetView($hwnd, 4)
EndSwitch
;========
;结束
;========
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
EndSelect
WEnd
GUIDelete()
页:
[1]