大小格式:776.41MB 下载速度:795038.81 加入时间:2007-02-15 08:37:29
JBeiJingV6详细信息:
破解方法:使用winrar解出:CS4JB6DicSetup.exe (ChinaScan4)JBV6pDicSetup.exe (北京V6)再使用UniExtract解出CS4JB6DicSetup.exe,内含十个档案,使用smallant8 提供的setup.ini取代原来的(偶提供的软件部份已附有)执行setup.exe安装完成后,在偶提供的的软件部份里的cscan4.exe取代原来的即可使用!(其实cscan4.exe是从ChinaScan4升级文件中抽取出来的)Roboword 部份:使手snowfoxbbs的方法安装好北京v6后,把下列文件解压至Roboword已安装目录即可!如:C:\Program Files\KODENSHA\jBeijingV6\Roboword文件下载(robowordc.rar):http://www.51files.com/?AST4SXRTUXPXOZS或http://pickup.mofile.com/3463440830229401
将这些写在一个模块里:Option Explicit
Public Declare Function SHGetFileInfo Lib "shell32.dll" Alias "SHGetFileInfoA" (ByVal pszPath As String, ByVal dwFileAttributes As Long, psfi As SHFILEINFO, ByVal cbFileInfo As Long, ByVal uFlags As Long) As Long
Public Declare Function OleCreatePictureIndirect Lib "oleaut32.dll" (pDicDesc As TypeIcon, riid As CLSID, ByVal fown As Long, lpUnk As Object) As Long
Public Type TypeIcon
cbSize As Long
picType As PictureTypeConstants
hIcon As Long
End Type
Public Type SHFILEINFO
hIcon As Long ' out: icon
iIcon As Long ' out: icon index
dwAttributes As Long ' out: SFGAO_ flags
szDisplayName As String * MAX_PATH ' out: display name (or path)
szTypeName As String * 80 ' out: type name
End Type
Public Const SHGFI_SMALLICON = &H1
Public Const SHGFI_LARGEICON = &H0
Public Const SHGFI_ICON = &H100
Public Type CLSID
id((123)) As Byte
End Type
Public Function GetFileIconS(ByVal sFileName As String) As StdPicture
Dim SHinfo As SHFILEINFO
Dim mTYPEICON As TypeIcon
Dim mCLSID As CLSID
Dim lFlag As Long
lFlag = SHGFI_SMALLICON
If Right(sFileName, 1) <>"\" Then sFileName = sFileName &"\"
Call SHGetFileInfo(sFileName, 0, SHinfo, Len(SHinfo), SHGFI_ICON + lFlag)
With mTYPEICON
.cbSize = Len(mTYPEICON)
.picType = vbPicTypeIcon
.hIcon = SHinfo.hIcon
End With
With mCLSID
.id(8) = &HC0
.id(15) = &H46
End With
Call OleCreatePictureIndirect(mTYPEICON, mCLSID, 1, GetFileIconS)
End Function
Public Function GetFileIconL(ByVal sFileName As String) As StdPicture
Dim SHinfo As SHFILEINFO
Dim mTYPEICON As TypeIcon
Dim mCLSID As CLSID
Dim lFlag As Long
lFlag = SHGFI_LARGEICON
If Right(sFileName, 1) <>"\" Then sFileName = sFileName &"\"
Call SHGetFileInfo(sFileName, 0, SHinfo, Len(SHinfo), SHGFI_ICON + lFlag)
With mTYPEICON
.cbSize = Len(mTYPEICON)
.picType = vbPicTypeIcon
.hIcon = SHinfo.hIcon
End With
With mCLSID
.id(8) = &HC0
.id(15) = &H46
End With
Call OleCreatePictureIndirect(mTYPEICON, mCLSID, 1, GetFileIconL)
End Function
然后就可以了。
其中 GetFileIconS 提取 16×16 的图标,GetFileIconL 提取 32×32 的图标。可以是任何存在的文件。
用法:
Private Sub Command2_Click()
Command1.Style = 1 'Graphic
Command1.Picture = GetFileIconS("C:\Windows\System32\cmd.exe")
End Sub
Private Sub Command3_Click()
Command1.Style = 1 'Graphic
Command1.Picture = GetFileIconL("C:\WIndows\System32\msvbvm60.dll")
End Sub
Public Type TypeIconcbSize As Long
picType As PictureTypeConstants
hIcon As Long
End Type
Public Type CLSID
id(16) As Byte
End Type
Public Const MAX_PATH = 260
Public Type SHFILEINFO
hIcon As Long'图标句柄
iIcon As Long'图标索引号
dwAttributes As Long'文件属性值
szDisplayName As String * MAX_PATH'文件的显示名
szTypeName As String * 80'文件的类型名
End Type
Public Declare Function OleCreatePictureIndirect Lib "oleaut32.dll" (pDicDesc As TypeIcon, riid As CLSID, ByVal fown As Long, lpUnk As Object) As Long
Public Declare Function SHGetFileInfo Lib "shell32.dll" Alias "SHGetFileInfoA" (ByVal pszPath As String, ByVal dwFileAttributes As Long, psfi As SHFILEINFO, ByVal cbFileInfo As Long, ByVal uFlags As Long) As Long
Public Const SHGFI_ICON = &H100
Public Const SHGFI_LARGEICON = &H0
Public Const SHGFI_SMALLICON = &H1
Public Const S_OK = &H0
Public Function IconHandleToPicture(hIcon As Long) As IPictureDisp '把图标句柄转为IPictureDisp (IPictureDisp类似于StdPicture)
Dim cls_id As CLSID
Dim Ret As Long
Dim IconParameter As TypeIcon
Dim lpUnk As IUnknown
With IconParameter
.cbSize = Len(IconParameter)
.picType = vbPicTypeIcon
.hIcon = hIcon
End With
With cls_id
.id(8) = &HC0
.id(15) = &H46
End With
Ret = OleCreatePictureIndirect(IconParameter, cls_id, 1, lpUnk)
If Ret = S_OK Then Set IconHandleToPicture = lpUnk
End Function
'以下是获得文件图标句柄并调用IconHandleToPicture将图标句柄转为IPictureDisp
Public Function GetFileIcon(FilePath, Optional ByVal SmallIcon As Boolean = False) As IPictureDisp
Dim hIcon As Long
Dim sh_info As SHFILEINFO
If SmallIcon = True Then
SHGetFileInfo FilePath, 0, sh_info, Len(sh_info), SHGFI_ICON Or SHGFI_SMALLICON
Else
SHGetFileInfo FilePath, 0, sh_info, Len(sh_info), SHGFI_ICON Or SHGFI_LARGEICON
End If
hIcon = sh_info.hIcon
Set GetFileIcon = IconHandleToPicture(hIcon)
End Function
调用实例:
ListView.View = lvwReport
ListView.FullRowSelect = True
ListView.ColumnHeaders.Add , , "项目", 7000
ImageList.ListImages.Add , "记事本图标", GetFileIcon(Environ("WINDIR") &"\system32\notepad.exe", False)
ImageList.ListImages.Add , "计算器图标", GetFileIcon(Environ("WINDIR") &"\system32\calc.exe", False)
ListView.SmallIcons = ImageList'设置与ListView关联的ImageList控件。注意需要在ImageList控件中添加了图片以后才能将ImageList与ListView关联,否则会出错。
ListView.ListItems.Add , "显示记事本图标", "显示记事本图标", , "记事本图标"
ListView.ListItems.Add , "显示计算器图标", "显示计算器图标", , "计算器图标"
ListView.ListItems.Add , "无图标", "无图标"
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)