| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2529 人关注过本帖
标题:关于资源管理器的制作
只看楼主 加入收藏
griefforyou
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:3336
专家分:0
注 册:2004-4-15
收藏
得分:0 
我这里运行一切正常,不知道你说的什么回事。
我这里双击文件夹快捷方式会进入这个文件夹,程序快捷方式会运行程序。

天津网站建设 http://www./
2005-04-03 19:04
sj_slq
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2005-3-28
收藏
得分:0 
斑竹,你好:
     我觉得你的资源管理器界面不是很好,能否改进一下?

欢迎交流!QQ:6177132
2005-04-05 23:50
griefforyou
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:3336
专家分:0
注 册:2004-4-15
收藏
得分:0 
晕,不是我的,我帮楼主改的。

天津网站建设 http://www./
2005-04-06 08:48
msxjc
Rank: 1
等 级:新手上路
帖 子:83
专家分:0
注 册:2005-3-28
收藏
得分:0 
再请教
以下是引用griefforyou在2005-4-3 19:04:14的发言: 我这里运行一切正常,不知道你说的什么回事。 我这里双击文件夹快捷方式会进入这个文件夹,程序快捷方式会运行程序。
版主,在我的机器上就是不能运行啊,运行了之后,如果双击快捷方式的话,文件夹还可以,如果是文件的话,界面上就会一片空白,文件也没打开。还有前进后退按钮用起来也不是很灵,连续两次后退的话,往往路径就错了,你说你那边都正常的,那我不知道怎么回事了,我在我的98下运行也是一样的问题,不知道什么原因,是否和安装有Service Pack有关系啊?我的操作系统和vb都没有装任何的Service Pack啊.

2005-04-06 22:50
griefforyou
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:3336
专家分:0
注 册:2004-4-15
收藏
得分:0 

我改了一下,可以了,后退可能是有点小问题,你自己改一下吧。 我录制了一段屏幕,你看看吧,http://www.popoyu.net/test.avi Private Declare Function ShellExecute Lib "Shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Private Declare Function GetDesktopWindow Lib "user32" () As Long Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long

Private Const SE_ERR_NOASSOC = 31

Dim PathHistory() As String, CurrentHistoryStep As Long Dim LastPath As String, OptFlag As Boolean Dim FSO As Object

Public Sub ShellDoc(strFile As String) Dim lngRet As Long Dim strDir As String

Set FSO = CreateObject("Scripting.FileSystemObject") If LCase(Right(strFile, 4)) = ".lnk" Then strFile = GetLinkTarget(strFile) If FSO.FolderExists(strFile) Then ShellView1.Path = strFile Exit Sub End If End If lngRet = ShellExecute(GetDesktopWindow, "open", strFile, vbNullString, vbNullString, vbNormalFocus) If lngRet = SE_ERR_NOASSOC Then strDir = Space(260) lngRet = GetSystemDirectory(strDir, Len(strDir)) strDir = Left(strDir, lngRet) Call ShellExecute(GetDesktopWindow, vbNullString, "RUNDLL32.EXE", "shell32.dll,OpenAs_RunDLL " & strFile, strDir, vbNormalFocus) End If

End Sub

Private Sub Form_Load() CurrentHistoryStep = 0 ReDim PathHistory(0) As String PathHistory(0) = ShellView1.Path LastPath = PathHistory(0) End Sub

Private Sub ShellView1_Changed(ByVal RemoveID As Boolean) On Error GoTo ErrHandler Dim i As Long If LastPath <> ShellView1.Path And OptFlag = False Then i = UBound(PathHistory) + 1 ReDim Preserve PathHistory(i) As String PathHistory(i) = ShellView1.Path CurrentHistoryStep = CurrentHistoryStep + 1 Call SetToolBar LastPath = ShellView1.Path

End If Exit Sub ErrHandler: Err.Clear End Sub

Private Sub ShellView1_ItemDblClick() ShellDoc ShellView1.SelectedPath End Sub

Private Function GetLinkTarget(strFileName As String) As String Dim iwSH As New IWshRuntimeLibrary.IWshShell_Class Dim iwSC As IWshRuntimeLibrary.IWshShortcut_Class Set iwSC = iwSH.CreateShortcut(strFileName) GetLinkTarget = iwSC.TargetPath End Function

Private Sub SetToolBar() If CurrentHistoryStep > 0 Then Toolbar1.Buttons("Back").Enabled = True End If If ShellView1.Path = "" Then Toolbar1.Buttons("Up").Enabled = False Else Toolbar1.Buttons("Up").Enabled = True End If End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button) Dim pos As Integer Dim Temp As String

Select Case Button.Key Case "Back" OptFlag = True CurrentHistoryStep = CurrentHistoryStep - 1 ShellView1.Path = PathHistory(CurrentHistoryStep) If CurrentHistoryStep = 0 Then Toolbar1.Buttons("Back").Enabled = False End If Toolbar1.Buttons("Forword").Enabled = True OptFlag = False Case "Forword" OptFlag = True CurrentHistoryStep = CurrentHistoryStep + 1 ShellView1.Path = PathHistory(CurrentHistoryStep) If CurrentHistoryStep = UBound(PathHistory) Then Toolbar1.Buttons("Forword").Enabled = False End If Toolbar1.Buttons("Back").Enabled = True OptFlag = False Case "Up" Debug.Print ShellView1.Path If Len(ShellView1.Path) = 3 Then ShellView1.Path = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}" ElseIf ShellView1.Path = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}" Then ShellView1.Path = "" Else pos = InStrRev(ShellView1.Path, "\") If pos > 0 Then Temp = Left(ShellView1.Path, pos - 1) If Len(Temp) = 2 Then Temp = Temp & "\" End If ShellView1.Path = Temp End If End If End Select Call SetToolBar End Sub

[此贴子已经被作者于2005-4-8 10:44:00编辑过]


天津网站建设 http://www./
2005-04-06 23:32
cmz3190
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2007-8-18
收藏
得分:0 
回复:(msxjc)关于资源管理器的制作
我想问一哈,关于用DHPHI怎么做这个啊,还有,这个编写此 资料管理器的思想是什么???
我的邮箱是cmz3190@126.com 谢谢各位的解答,可以将答案发的我的邮箱中!!!
  谢谢!!!
2007-08-18 23:20
快速回复:关于资源管理器的制作
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018610 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved