vb窗口前置代码
搜集到一个窗口前置代码但调试发现错误6溢出,请高手查看问题所在PrivateDeclareFunctionSetWindowPosLib"user32"(ByValh%,...
搜集到一个窗口前置代码 但调试发现 错误6 溢出,请高手查看问题所在
Private Declare Function SetWindowPos Lib "user32" (ByVal h%, ByVal hb%, ByVal x%, ByVal y%, ByVal cx%, ByVal cy%, ByVal f%) As Integer
Private Const SWP_NOMOVE = 2
Private Const SWP_NOSIZE = 1
Private Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Private Const HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2
Private Sub Command1_Click()
res% = SetWindowPos(Form1.hWnd, HWND_TOPMOST, _
0, 0, 0, 0, FLAGS)
End Sub 展开
Private Declare Function SetWindowPos Lib "user32" (ByVal h%, ByVal hb%, ByVal x%, ByVal y%, ByVal cx%, ByVal cy%, ByVal f%) As Integer
Private Const SWP_NOMOVE = 2
Private Const SWP_NOSIZE = 1
Private Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Private Const HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2
Private Sub Command1_Click()
res% = SetWindowPos(Form1.hWnd, HWND_TOPMOST, _
0, 0, 0, 0, FLAGS)
End Sub 展开
4个回答
展开全部
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByValcy As Long, ByVal wFlags As Long) As Long
Private Const HWND_TOPMOST = -1
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOSIZE = &H1
Private Sub Command1_Click()
res% = SetWindowPos(Me.hwnd, -1, 0, 0, 0, 0, &H2 Or &H1)
End Sub
Private Const HWND_TOPMOST = -1
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOSIZE = &H1
Private Sub Command1_Click()
res% = SetWindowPos(Me.hwnd, -1, 0, 0, 0, 0, &H2 Or &H1)
End Sub
展开全部
Option Explicit
Const Hwndx = -1
Private Declare Function SetWindowPos Lib "user32" (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
Private Sub Form_Load()
Dim XX As Long
XX = SetWindowPos(Me.Hwnd, Hwndx, 0, 0, 0, 0, 3)
End Sub
我已经用它编了还几个程序了,没有问题的。
Const Hwndx = -1
Private Declare Function SetWindowPos Lib "user32" (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
Private Sub Form_Load()
Dim XX As Long
XX = SetWindowPos(Me.Hwnd, Hwndx, 0, 0, 0, 0, 3)
End Sub
我已经用它编了还几个程序了,没有问题的。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
SetWindowPos hwnd, -1, 0, 0, 0, 0, &H20 Or &H2 Or &H1
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
将 % 换成 &
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询