词条 | 前端显示 |
释义 | 前段显示我不知道你说的是啥,我理解应该是某个程序窗口始终置顶,也就是说这程序窗口打开后,不管你再点击什么,它都不会被掩盖,始终显示在前面。 VB的前端显示(置顶)源码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 Const a& = -1 '置顶 Private Const b& = &H1 Private Const c& = &H2 Private Const d& = -2 '正常 Private Sub Form_Load() SetWindowPos Me.hWnd, a, 0, 0, 0, 0, b Or c End Sub 'Checkbox的值 Private Sub Check1_Click() If Check1.Value = 2 Then SetWindowPos Me.hWnd, a, 0, 0, 0, 0, b Or c If Check1.Value = 1 Then SetWindowPos Me.hWnd, a, 0, 0, 0, 0, b Or c If Check1.Value = 0 Then SetWindowPos Me.hWnd, d, 0, 0, 0, 0, b Or c End Sub |
随便看 |
百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。