VB6.0在编译declare语句时报错,无法通过
发布时间:2020-12-17 07:58:22 所属栏目:百科 来源:网络整理
导读:是这样的,我做了一个DLL文件,然后在exe工程里的(general)做declare,但编译时即不通过,报如下错误: compile error: constants,fixed-length strings,arrays,user-defined types and declare statements not allowed as public members of object module
是这样的,我做了一个DLL文件,然后在exe工程里的(general)做declare,但编译时即不通过,报如下错误: compile error: constants,fixed-length strings,arrays,user-defined types and declare statements not allowed as public members of object modules 查询帮助,其意思为:“常数、固定长度字符串、数组、自定义类型与 Declare 语句不能是对象模块中的 Public 成员”。 我没辙了,在网上找了些案例,新建一个空的exe的工程,拷入案例中的declare声明语句,所有源代码如下: Declare Function SendMessage Lib "user32" Alias "SendMessageA" _ (ByVal hwnd As Long,ByVal wMsg As Long,ByVal wParam As Long,_ lParam As Any) As Long Private Sub Command1_Click() MsgBox ("nihao") End Sub 就这样一个工程,编译时还是报相同错误,看样子是编译器的问题,我该怎么办? (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |