VB编程的几个API函数的应用问题
问:-如何在我的程序中下载文件?
Re:
一个例子:一个命令和两个文本代码如下:
Private declare function dofile download lib " shdocvw . dll "(byval lpszfile as string)as long。
private sub command 1 _ click()
dim sdownload as string
sdownload = strconv(text 1 . text,VB unicode)
call dofile download(sdownload)
end sub
private sub form _ load()
text = " http://www . chat . ru/~ soft daily/fo-ag 162 . zip "
form 1 . caption = " audio grabber 1.62 full
问:-如何在vb中定义一个热键,使应用程序的窗口最小化时,可以被热键唤醒?
Re:
先声明api函数sendmessage,然后添加一个按钮和下面的代码;
private declare function sendmessage lib " user 32 "别名" sendmessagea" (byva l hwnd as long、byval_ wmsg as long、byval wparam as long、Lparamas any)as long
private subcommand 1 _ click()
dimwkey as long
wkey = 66
x = sendmessage(me . hwnd,WM _ sethotkey,wkey,0)
ms,64,"定义快捷键"]
0条评论