Visual Basic - Formularios "Always on the Top" en VB 6

Life is soft - evento anual de software empresarial
 
Vista:

Formularios "Always on the Top" en VB 6

Publicado por MrGUIDE (6 intervenciones) el 17/05/2004 01:03:04
Deseo saber cómo establecer la propiedad "Always on the top" o "Siempre Visible" en un formulario de VB 6.

Gracias...
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:Formularios

Publicado por Jorge Gonzalez (21 intervenciones) el 17/05/2004 06:02:37
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const SWP_NOACTIVATE = &H10
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)

Private Sub Form_Activate()
'con estos parametros el form permanece siempre visible y no se modifica el tamaño, o la posicion
SetWindowPos Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE
End Sub
'Si el formulario se sigue ocultando detras de alguna ventana, simplemente copia este codiga dentro del evento Paint() del form.
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

Muchas gracias Jorge Gonzalez

Publicado por MrGUIDe (6 intervenciones) el 17/05/2004 06:12:41
Gracias Jorge
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