Q:–怎样在我的程序中实现文件下载
Re:
一个例子:一个Command,两个Text代码如下:
PrivateDeclareFunctionDoFileDownloadLib"shdocvw.dll"(ByVallpszFileAsString)AsLong
PrivateSubCommand1_Click()
DimsDownloadAsString
sDownload=StrConv(Text1.Text,vbUnicode)
CallDoFileDownload(sDownload)
EndSub
PrivateSubForm_Load()
Text1.Text="http://www.chat.ru/~softdaily/fo-ag162.zip"
Form1.Caption="Audiograbber1.62Full"
Text2.Text="http://www6.50megs.com/audiograbber/demos/cr-ag161.zip"
EndSub
Q:–如何在vb中定义一个热键,使得当一个应用程序的窗口最小化后,可以通过热键来唤醒它
Re:
先声明API函数SendMessage,然后添加一个按钮和如下代码;
PrivateDeclareFunctionSendMessageLib"user32"Alias"SendMessageA"(ByValhwndAsLong,ByVal_ wMsgAsLong,ByValwparamAsLong,lparamAsAny)AsLong
PrivateSubCommand1_Click()
DimwKeyAsLong
wKey=66
X=SendMessage(Me.hwnd,WM_SETHOTKEY,wKey,0)
MsgBox"B键将激活窗体!",64,"定义快捷键"
EndSub
enjoyit!
->