Visual Basic - VENTANA SIEMPRE VISIBLE

Life is soft - evento anual de software empresarial
 
Vista:

VENTANA SIEMPRE VISIBLE

Publicado por parles (2 intervenciones) el 09/11/2002 04:15:17
COMO PUEDO HACER QUE UN FORM APAREZCA SIEMPRE ENCIMA DE TODAS LAS VENTANAS QUE TENGA ABIERTA DE OTROS PROGRAMAS COMO EL "ALWAYS ON TOP" DEL WINAMP?

PARLES
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:VENTANA SIEMPRE VISIBLE

Publicado por josé (83 intervenciones) el 09/11/2002 05:10:05
Esto lo baje de:
http://www.atawalabachala.es.org/vb.htm

Esto va en un modulo:

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)
Public Const HWND_TOPMOST& = -1
Public Const SWP_NOMOVE& = &H2
Public Const SWP_NOSIZE& = &H1
Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE

Esto lo pegas luego:

Public Sub ShowHoldForm(Ventana As Form)
Dim Success
'**** Para las ventanitas que quedan por encima de las demás, ****
Success = SetWindowPos(Ventana.hwnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
End Sub

Y esto desde luego en el Form:

Private Sub Form_Load()
ShowHoldForm Form1
End Sub
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar