di superpippi » 12/08/02 22:33
Non c'è problema ho trovato la risposta da solo, per chi interessa la scrivo sotto:
Option Explicit
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 HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2
Private Const SWP_NOSIZE = 1
Private Const SWP_NOMOVE = 2
Private Const lngNoChangePos = SWP_NOMOVE + SWP_NOSIZE
Private Sub chkPrimoPiano_Click()
'se qualcuno clicca qui il form diventa in primo piano
If chkPrimoPiano.Value = vbChecked Then
Call SetWindowPos(Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, lngNoChangePos)
Else
Call SetWindowPos(Me.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, lngNoChangePos)
End If
End Sub
_____
comunque ringrazio chiunque si sia interessato