VB.NET实现窗体始终在前面显示?
答案:2 悬赏:0 手机版
解决时间 2021-11-11 00:34
- 提问者网友:遮云壑
- 2021-11-10 20:10
VB.NET实现窗体始终在前面显示?
最佳答案
- 五星知识达人网友:第幾種人
- 2021-11-10 20:41
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
全部回答
- 1楼网友:野慌
- 2021-11-10 21:46
把窗体属性TopMost设置为True也行吧
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯