Visual Basic - Siempre "on Top"

Life is soft - evento anual de software empresarial
 
Vista:

Siempre "on Top"

Publicado por Nocturno (11 intervenciones) el 17/10/2003 01:08:59
COMO LE HAGO PARA QUE UNA VENTANA SIEMPRE ESTE ENCIMA DE CUALQUIER OTRA QUE SE PUDIERA ABRIR MIENTRAS ESTA ESTE PRESENTE? ( POR EJEMPLO LA OPCION QUE TIENE WINAMP PARA ESTAR SIEMPRE ENCIMA AUNQUE ESTEMOS NAVEGANDO O PROGRAMANDO ) COMO PROGRAMO O QUE ATRIBUTOS TENGO QUE PONERLE A MI FORMULARIO ?
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:Siempre

Publicado por Cecilia Colalongo (3116 intervenciones) el 17/10/2003 02:23:57
En http://support.microsoft.com/support/kb/articles/q184/2/97.asp tienes la forma de hacerlo, se hace con:

Public Const SWP_NOMOVE = 2
Public Const SWP_NOSIZE = 1
Public Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Public Const HWND_TOPMOST = -1
Public Const HWND_NOTOPMOST = -2
Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" _
(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
Public Function SetTopMostWindow(hwnd As Long, Topmost As Boolean) _
As Long
If Topmost = True Then 'Make the window topmost
SetTopMostWindow = SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, _
0, FLAGS)
Else
SetTopMostWindow = SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, _
0, 0,FLAGS)
SetTopMostWindow = False
End If
End Function
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