您的位置:程序门 -> vb -> 基础类



有没有可以下载程序的命令行程序?


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


有没有可以下载程序的命令行程序?[已结贴,结贴人:morbidangel]
发表于:2007-07-26 15:32:08 楼主
像这样   dload。exe     ”http://fdsa.com/aa.jpg“   ”c:\\aa\pp.jpg“
发表于:2007-07-26 15:45:321楼 得分:20
为啥一定要命令行程序?

用一个api就可以了。

用法:
if   downloadtofile( "http://fdsa.com/aa.jpg ", "c:\aa\pp.jpg ")   then
        msgbox   "下载成功 "
end   if


代码:
-------------------------------------

private   const   error_success   as   long   =   0

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   downloadtofile(byval   surl   as   string,byval   slocalfile   as   string)   as   boolean
        downloadtofile   =   urldownloadtofile(0,   surl,   slocalfile,   0,   0)   =   error_success
end   function
发表于:2007-10-24 22:04:572楼 得分:0
楼上的可以用


快速检索

最新资讯
热门点击