Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPrivate Sub Form_Load() aa = FindWindow("Notepad", "dat.txt - 记事本") If aa <> 0 Then MsgBox "文件已经打开" Else MsgBox "文件没打开" End If End Sub98+vb6下通过,给分!
aa = FindWindow("Notepad", "dat.txt - 记事本")
If aa <> 0 Then
MsgBox "文件已经打开"
Else
MsgBox "文件没打开"
End If
End Sub98+vb6下通过,给分!
有趣!!