代码如下:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Sub Timer1_Timer()
Dim cc As Long
cc = FindWindow(vbNullstrinng, "《龙魂》(封测)0.80 100121.2370(Jan 20 2010 14:27:23)")
If cc = 0 Then
Label1.Caption = "连接失败"
Else
Label1.Caption = "连接成功"
End If
End Sub