![]() ![]() |
|
VB编程的几个API函数的应用问题 | |
作者:佚名 文章来源:不详 点击数 更新时间:2008/4/18 14:48:38 文章录入:杜斌 责任编辑:杜斌 | |
|
|
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 |
|
![]() ![]() |