在vb中怎樣才可能知道有沒有安裝powerpoint,和安裝了什么版本???????救命!
解决方案 »
- 【求助】记录集设置为静态游标,设置AbsolutePage时报错:当前记录集不支持书签
- 自動獲取條形碼掃描問題,在線等!急!
- 基础问题!!!!!!!
- Empty、Null和""有什么区别???
- 怎样在VB中调试VB写的COM组件,但客户程序是非VB的EXE文件
- Winsock可不可以做监听所有端口程序?分不多了,望高手指点
- MSGBOX也会出错,怎么办?
- 关于API的问题?
- 请问在vb6.0中如何只删除在文本框中选中的文字
- 水晶报表控件正在运行一个需要很长时间才能计算完的报表,通过程序怎样才能把它停下来。上司吩咐,义无反顾,难题困恼,彻夜难眠.急急急
- 再问窗口互斥显示问题。
- 容易的问题,但是我不知道,请帮帮忙!
powerpoint的安裝與否啊?
大俠!還有什么解決方法!
多謝!
'’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’
' Copyright ?1996-2004 VBnet, Randy Birch, All Rights Reserved.
' Some pages may also contain other copyrights by the author.
'’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’
' Distribution: You can freely use this code in your own
' applications, but you may not reproduce
' or publish this code on any web site,
' online service, or distribute as source
' on any media without express permission.
'’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’
Private Declare Function FindExecutable Lib "shell32" _
Alias "FindExecutableA" _
(ByVal lpFile As String, _
ByVal lpDirectory As String, _
ByVal sResult As String) As LongPrivate Const MAX_PATH As Long = 260
Private Const ERROR_FILE_NO_ASSOCIATION As Long = 31
Private Const ERROR_FILE_NOT_FOUND As Long = 2
Private Const ERROR_PATH_NOT_FOUND As Long = 3
Private Const ERROR_FILE_SUCCESS As Long = 32 'my constant
Private Const ERROR_BAD_FORMAT As Long = 11Private Sub Command1_Click() Dim success As Long
Dim pos As Long
Dim sResult As String
Dim msg As String
sResult = Space$(MAX_PATH) 'lpFile: name of the file of interest
'lpDirectory: location of lpFile
'sResult: path and name of executable associated with lpFile
success = FindExecutable("040301修改意见.doc", "E:\My program\DHtj\", sResult)
Select Case success
Case ERROR_FILE_NO_ASSOCIATION: msg = "no association"
Case ERROR_FILE_NOT_FOUND: msg = "file not found"
Case ERROR_PATH_NOT_FOUND: msg = "path not found"
Case ERROR_BAD_FORMAT: msg = "bad format"
Case Is >= ERROR_FILE_SUCCESS:
pos = InStr(sResult, Chr$(0))
If pos Then
msg = Left$(sResult, pos - 1)
End If
End Select
MsgBox msg
End Sub
'--end block--’
以doc为例
1)在HKEY_CLASSES_ROOT中查找扩展名.doc找到HKEY_CLASSES_ROOT\.doc,取其默认值Word.Document.82)在HKEY_CLASSES_ROOT中查找Word.Document.8
找到HKEY_CLASSES_ROOT\Word.Document.8\shell\Open\command\,其默认值就是程序路径如果找不到,自然就没安装了。