用一个timer做定时器。然后用下面的方法运行程序。'/////////////////////////////////// '界面: Dim m_strApplication As String '程序路径StartProcess m_strApplication'/////////////////////////////////// '模块: Dim AppInfo As SHELLEXECUTEINFO ' Place holder for Application InformationDeclare Function ShellExecuteEx Lib "shell32.dll" Alias "ShellExecuteExA" (lpExecInfo As SHELLEXECUTEINFO) As Boolean' PRIVATE TYPES Type SHELLEXECUTEINFO cbSize As Long fMask As Long hwnd As Long lpVerb As String lpFile As String lpParameters As String lpDirectory As String nShow As Long hInstApp As Long ' Optional fields lpIDList As Long lpClass As String hkeyClass As Long dwHotKey As Long hIcon As Long hProcess As Long End Type Public Function StartProcess(strFile As String) Dim ret As Boolean ' Return Value AppInfo.cbSize = Len(AppInfo) ' Length AppInfo.lpFile = strFile ' File set from a common dialog box AppInfo.hwnd = frmMain.hwnd ' HWnd of Calling Object AppInfo.lpVerb = "open" ' String how to handle app AppInfo.nShow = SW_SHOWNORMAL ' How do we show it? AppInfo.hProcess = 0 ' set Initial ProcessId AppInfo.fMask = SEE_MASK_NOCLOSEPROCESS
' Execute the Application ret = ShellExecuteEx(AppInfo)
一、用Timer控件
datetime函数
二、
用windows的AT命令
计划任务
结合timer
'界面:
Dim m_strApplication As String '程序路径StartProcess m_strApplication'///////////////////////////////////
'模块:
Dim AppInfo As SHELLEXECUTEINFO ' Place holder for Application InformationDeclare Function ShellExecuteEx Lib "shell32.dll" Alias "ShellExecuteExA" (lpExecInfo As SHELLEXECUTEINFO) As Boolean' PRIVATE TYPES
Type SHELLEXECUTEINFO
cbSize As Long
fMask As Long
hwnd As Long
lpVerb As String
lpFile As String
lpParameters As String
lpDirectory As String
nShow As Long
hInstApp As Long
' Optional fields
lpIDList As Long
lpClass As String
hkeyClass As Long
dwHotKey As Long
hIcon As Long
hProcess As Long
End Type
Public Function StartProcess(strFile As String)
Dim ret As Boolean ' Return Value AppInfo.cbSize = Len(AppInfo) ' Length
AppInfo.lpFile = strFile ' File set from a common dialog box
AppInfo.hwnd = frmMain.hwnd ' HWnd of Calling Object
AppInfo.lpVerb = "open" ' String how to handle app
AppInfo.nShow = SW_SHOWNORMAL ' How do we show it?
AppInfo.hProcess = 0 ' set Initial ProcessId
AppInfo.fMask = SEE_MASK_NOCLOSEPROCESS
' Execute the Application
ret = ShellExecuteEx(AppInfo)
End Function'///////////////////////////////////
我用过
命令格式为 at自己找找相关资料看看吧.
楼主: 本软件是我在业余时间完成,我的目标是将它做成国内一流的客户端邮件软件.现在初具模型.正在修改中.它有一下特点:
1. 基于SDK模式开发
2. 大量源代码:软件中用到的所有组件,包括每一个按钮,均是自己所写.形成了自己风格的完整的一套组件库.他们包括:列表,文件管理,菜单等
所有代码均参照标准协议写成3. 由以下功能模块组成:邮件;新闻组;FTP;任务及其在之基础上的相应管理.如文件管理等.
4. 合作方式:转让经营权;根据你们需要提供技术支持;作为贵公司产品发布等,我们可以详细谈.我的联系方式是:[email protected] 13062323245一下为该软件部分运行界面图:
安装盘下:ftp://[email protected]/SmartMai_Setup.EXE代码下:ftp://[email protected]/SmartMail_Code.rarftp密码:uploads建议大家先下安装盘,因为比较新,
http://bbs.2ccc.com/uploads/huangtao/picture.jpg
安装盘下:ftp://[email protected]/SmartMai_Setup.EXE
代码下:ftp://[email protected]/SmartMail_Code.rar
ftp密码:uploads
安装盘下:ftp://[email protected]/SmartMail_Setup.rar