【发布时间】:2010-11-22 07:38:36
【问题描述】:
当用户单击名为“打印”的命令按钮时,我需要从 VB6 代码中备份访问数据库。我认为单独的批处理文件是理想的。如何导致批处理文件从 VB 运行?一旦可以激活批处理文件,我应该能够使用简单的 xcopy 命令将数据库复制到可移动驱动器。非常感谢所有帮助。
【问题讨论】:
-
离题,但是当用户单击名为“备份”的按钮时,您的应用程序应该执行什么操作?
标签: vb6
当用户单击名为“打印”的命令按钮时,我需要从 VB6 代码中备份访问数据库。我认为单独的批处理文件是理想的。如何导致批处理文件从 VB 运行?一旦可以激活批处理文件,我应该能够使用简单的 xcopy 命令将数据库复制到可移动驱动器。非常感谢所有帮助。
【问题讨论】:
标签: vb6
Shell("path-to-batch-file", vbHide)
当然,如果您不想隐藏它,这里有一个选项列表。
vbHide 0 Window is hidden and focus is passed to the hidden window.
vbNormalFocus 1 Window has focus and is restored to its original size and position.
vbMinimizedFocus 2 Window is displayed as an icon with focus.
vbMaximizedFocus 3 Window is maximized with focus.
vbNormalNoFocus 4 Window is restored to its most recent size and position. The currently active window remains active.
vbMinimizedNoFocus 6 Window is displayed as an icon. The currently active window remains active.
【讨论】: