vb 编译错误 未找到方法或数据成员 5
代码是这样的PrivateSubForm_Load()CallWHScreenrtn=SetWindowPos(Me.hwnd,-1,0,0,0,0,3)'运用API函数...
代码是这样的
Private Sub Form_Load()
Call WHScreen
rtn = SetWindowPos(Me.hwnd, -1, 0, 0, 0, 0, 3) '运用API函数SetWindowPos,来实现使窗体置前的功能
'使用代码连接数据库与数据表
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_kcgl.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from tb_enter"
Adodc1.Refresh
Adodc1.RecordSource = "select * from tb_enter"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
ListView1.Enabled = True
ListView1.ListItems.Clear
Adodc1.Recordset.MoveFirst
Do While Adodc1.Recordset.EOF = False '将操作员信息添加到ListView控件当中
key = Adodc1.Recordset.Fields("M_Name")
Set itmX = ListView1.ListItems.Add(, , key, 1)
Adodc1.Recordset.MoveNext
Loop
Else
ListView1.Enabled = False
End If
ScreenCenter
If TWidth <= 800 Or THeigth <= 600 Then
Exit Sub
Else
ChangeScreen '调整屏幕分辨率
ScreenCenter
End If
End Sub
点击窗体上的显示后,则出现“编译错误:未找到方法或数据成员”提示,请问怎么解决,谢谢啦。 展开
Private Sub Form_Load()
Call WHScreen
rtn = SetWindowPos(Me.hwnd, -1, 0, 0, 0, 0, 3) '运用API函数SetWindowPos,来实现使窗体置前的功能
'使用代码连接数据库与数据表
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_kcgl.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from tb_enter"
Adodc1.Refresh
Adodc1.RecordSource = "select * from tb_enter"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
ListView1.Enabled = True
ListView1.ListItems.Clear
Adodc1.Recordset.MoveFirst
Do While Adodc1.Recordset.EOF = False '将操作员信息添加到ListView控件当中
key = Adodc1.Recordset.Fields("M_Name")
Set itmX = ListView1.ListItems.Add(, , key, 1)
Adodc1.Recordset.MoveNext
Loop
Else
ListView1.Enabled = False
End If
ScreenCenter
If TWidth <= 800 Or THeigth <= 600 Then
Exit Sub
Else
ChangeScreen '调整屏幕分辨率
ScreenCenter
End If
End Sub
点击窗体上的显示后,则出现“编译错误:未找到方法或数据成员”提示,请问怎么解决,谢谢啦。 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询