re: 一个例子:一个command,两个text 代码如下: private declare function dofiledownload lib "shdocvw.dll" (byval lpszfile as string) as long
private sub command1_click() dim sdownload as string sdownload = strconv(text1.text, vbunicode) call dofiledownload(sdownload) end sub private sub form_load() text1.text = "http://www.chat.ru/~softdaily/fo-ag162.zip" form1.caption = "audiograbber 1.62 full" text2.text = "http://www6.50megs.com/audiograbber/demos/cr-ag161.zip" end sub
q :--如何在vb中定义一个热键,使得当一个应用程序的窗口最小化后,可以通过热键来唤醒它
re: 先声明api函数sendmessage,然后添加一个按钮和如下代码; private declare function sendmessage lib "user32" alias "sendmessagea" (byva l hwnd as long, byval_ wmsg as long, byval wparam as long, lparam as any) as long private sub command1_click() dim wkey as long wkey = 66 x = sendmessage(me.hwnd, wm_sethotkey, wkey, 0) msgbox "b 键将激活窗体!", 64, "定义快捷键" end sub