a 程序死掉后,自动重启a程序~有没有具体代码实现?
解决方案 »
- 将一个设计时的窗体Form1变量实例化以后怎样正确卸载它并释放对象实例呢?
- 如何创建24位位图?
- 为什么所有VB函数都不能用
- 我现在做一个项目,越做就越多窗口和模块,现在想将部分固定功能进行模块化,并独立成一个DLL,请大家给出方案!
- 我在vb里写了一个dll,里面只有一句话,msgbox ....
- 数据库问题
- 请教高手兄弟一个API涵数的问题,我不知道该函数是什么意思和怎么使用它!!多谢,我在线等待!
- 怎么才能使form窗体完全显示出来???
- 请教CrystaIReports的用法,希望哪位给个最简单的例子,因为我以过个控件一点都不会!
- 一个女程序员的问题
- vb的小問題,不知有沒有人注意到!
- 各位高手,用VB打开数据库中ole对象类型的字段
Begin VB.Form Form1
Caption = "进程1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.Timer Timer1
Interval = 3000
Left = 1320
Top = 1320
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 495
Left = 1800
TabIndex = 0
Top = 1320
Width = 1215
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPrivate Sub Command1_Click()
End
End SubPrivate Sub Timer1_Timer()
Dim p As String
If Right(App.Path, 1) = "\" Then
p = App.Path + "2.exe"
Else
p = App.Path + "\2.exe"
End If
If FindWindow(vbNullString, "进程2") = 0 Then Shell (p)
End Sub
VERSION 5.00
Begin VB.Form Form1
Caption = "进程2"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.Timer Timer1
Interval = 3000
Left = 1320
Top = 1320
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 495
Left = 1800
TabIndex = 0
Top = 1320
Width = 1215
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPrivate Sub Command1_Click()
End
End SubPrivate Sub Timer1_Timer()
Dim p As String
If Right(App.Path, 1) = "\" Then
p = App.Path + "1.exe"
Else
p = App.Path + "\1.exe"
End If
If FindWindow(vbNullString, "进程1") = 0 Then Shell (p)
End Sub