|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Registered User
Iscritto dal: Aug 2002
Messaggi: 274
|
form on top
ho un problema.. in una form on top facccio aprire una msgbox vbyesno dalla quale devo decidere una cosa..
il problema è che è nascosta dalla form stessa come posso ovviare il problema ? (mantenendo il form on top o qualcosa di simile) |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Aug 2002
Città: Biella
Messaggi: 1882
|
Io faccio cosi e da me funziona tutto correttamente:
Private Const HWND_TOPMOST = -1 Private Const HWND_NOTOPMOST = -2 Private Const SWP_NOACTIVATE = &H10 Private Const SWP_SHOWWINDOW = &H40 Private Declare Sub 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) Public Sub FormTopFocus(ByRef objFrmAux As Object, ByVal bTopFocus As Boolean) If bTopFocus = True Then 'setto la form in primo piano Call SetWindowPos(objFrmAux.hwnd, HWND_TOPMOST, (objFrmAux.Left / 15), (objFrmAux.Top / 15), (objFrmAux.Width / 15), (objFrmAux.Height / 15), SWP_NOACTIVATE Or SWP_SHOWWINDOW) Else 'setto la form con focus normale Call SetWindowPos(objFrmAux.hwnd, HWND_NOTOPMOST, (objFrmAux.Left / 15), (objFrmAux.Top / 15), (objFrmAux.Width / 15), (objFrmAux.Height / 15), SWP_NOACTIVATE Or SWP_SHOWWINDOW) End If End Sub |
|
|
|
|
|
#3 |
|
Member
Iscritto dal: Aug 2001
Città: Gerenzano
Messaggi: 129
|
... altrimenti puoi utilizzare l'opzione vbSystemModal ed il tuo msgBox verrà visualizzato sopra a qualsiasi finesta già aperta.
Es: MsgBox "Ciao", vbYesNo OR vbSystemModal
__________________
E' quasi tutto relativo! |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 05:16.



















