VB.Net 问题:Form 自动消失# DotNet - 窗口里的风景
M*r
1 楼
作了一个简单的"Hello World" Form,用F5起来,没问题。
然后加了个module,内容如下:
*************************************
Module MainModule
Dim frm1 As New frmLogin1()
Sub Main()
If PrevInstance() Then
msg = "This Program is already running. Please shut down the
currently running"
msg = msg & " process before starting a new one"
MsgBox(msg, vbInformation)
Exit Sub
Else
Startapplication()
End If
End Sub
Function PrevInstance()
然后加了个module,内容如下:
*************************************
Module MainModule
Dim frm1 As New frmLogin1()
Sub Main()
If PrevInstance() Then
msg = "This Program is already running. Please shut down the
currently running"
msg = msg & " process before starting a new one"
MsgBox(msg, vbInformation)
Exit Sub
Else
Startapplication()
End If
End Sub
Function PrevInstance()