大家 帮忙看看怎么回事?
muniu 2003-08-20 09:08:37 在编写的dll组件里,api函数为什么不能声明成public,用public
不能编译,虽然用private能够编译,但是结果不对是不是和这个有
关。
Option Explicit
Private Declare Function FindWindow Lib "user32"
Alias "FindWindowA" (ByVal lpClassName As String, ByVal
lpWindowName As String) As Long
Public Function findwin() As Long
Dim Handle As Long
Handle = FindWindow("XLMAIN", vbNullString)
If Handle <> 0 Then
findwin = 1
Else
findwin = 0
End If
End Function