一、如何用 vb 启动其他程序或开启各类文件
要在 vb 中启动其他程序或开启各类文件,最简单的方法就是使用 shell 函数,例如:要开启 c:\test.txt 这个文字文件,则要启动记事本来开启这个文件案,程序如下:
dim retval as long
retval = shell("c:\windows\notepad.exe c:\test.txt", 3)
private declare function sendmessage lib "user32" alias "sendmessagea" (byval hwnd as long, byval wmsg as long, byval wparam as long, lparam as any) as long
const em_undo = &hc7
private declare function sendmessage lib "user" (byval hwnd as integer, byval wmsg as integer, byval wparam as integer, lparam as any) as long
const wm_user = &h400
const em_undo = wm_user + 23
private sub command1_click()
dim undoresult as long
undoresult = sendmessage(text1.hwnd, em_undo, 0, 0)
'传回值 undoresult = -1 表示 undo 不成功
end sub
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器