请各位看这段代码如下:
Private Declare Function SetWindowPos Lib "user32" ()
Private Sub Command1_Click()
i = SetWindowPos(Form1.hWnd, -1, 234, 0, 56767, 234)
Print "窗体总在最前面"
End Sub
当我运行时提示出错:Dll调用约定出错,这是什么意思呀?如何解决这个问题呢?
參考答案:你的api声明不完整
private Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long