菜鸟问题--在线等

blue_snow 2003-03-25 12:12:05
我看了一个用vb写的activex控件,发现它有这样几个文件download.ctl,download.exp,download.lib,download.vbp,download.vbw
请问这几个后缀名都是做什么的,每个activex控件都有这几个文件吗?
如果我要修改这个控件只需要改哪个文件就行了?,改完之后只需保存我就能调用这个控件了吗?
...全文
14 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
minajo21 2003-03-25
  • 打赏
  • 举报
回复
.ctl等文件都是这个控件的源程序代码的文件,.vbp是存放这个控件的工程名,用它来打开修改,然后编译
blue_snow 2003-03-25
  • 打赏
  • 举报
回复
这是组件download.ctl文件里的代码,怎么看不懂,这是在干什么?Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long 这个函数我怎么找不到


Option Explicit

Public ErrInfo As String
Public DownloadDir As String
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long

Public Function download(Folderurl As String)
On Error Resume Next
Dim returnvalue As Long
Dim strUrl As String, strDes As String
Dim File As String
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim strsql As String
conn.Provider = "msdaipp.dso"
conn.Open Folderurl
strsql = "SELECT ""DAV:href"",""urn:schemas:custom:folder:meetingapprove:subject"" FROM """ & Folderurl & """ where not(""urn:schemas:custom:folder:meetingapprove:subject"" is null) "

Set rs = conn.Execute(strsql)
If Err.Number <> 0 Then
ErrInfo = Err.Description
'MsgBox Err.Description & "下载文件发生错误!", , "错误"
Exit Function
End If
If (rs.EOF And rs.BOF) Then
ErrInfo = "没有需要下载的文件!"
'MsgBox "没有需要下载的文件!", , "提示"
Exit Function
End If

Do Until rs.EOF
File = rs.Fields("urn:schemas:custom:folder:meetingapprove:subject") '附件文件名
'strUrl = rs.Fields("DAV:href") & "\" & File
strUrl = rs.Fields("RESOURCE_ABSOLUTEPARSENAME") & "/" & File 'Win9x下的ADO2.5不支持上面的字段描述
strDes = "c:\winnt\temp\" & File
returnvalue = URLDownloadToFile(0, strUrl, strDes, 0, 0)
rs.MoveNext
Loop

If Err.Number <> 0 Then
ErrInfo = Err.Description
End If

'MsgBox "文件已成功下载到您本地目录:<c:\会议审议下载文件>", , "成功"

End Function

litsnake1 2003-03-25
  • 打赏
  • 举报
回复
这还不简单,他有界面说明有需要显示东西吗,如果你实在看不下去了,不想看见它,那么将这个控件的visible属性设为false不就行了,
minajo21 2003-03-25
  • 打赏
  • 举报
回复
界面?控件嘛,用的时候是放在窗体或其它控件上的,所以设计的时候尽可能的只要有效的部分。还要写resize
jdcxf 2003-03-25
  • 打赏
  • 举报
回复
没办法吧.除非问开发的源码
blue_snow 2003-03-25
  • 打赏
  • 举报
回复
在这个控件中执行的时候会有一个界面,我想把这个界面去掉怎么办?

1,451

社区成员

发帖
与我相关
我的任务
社区描述
VB 控件
社区管理员
  • 控件
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧