Ver Mensaje Individual
  #4  
Antiguo 13-01-2008
Avatar de xEsk
[xEsk] xEsk is offline
Miembro Premium
 
Registrado: feb 2006
Posts: 454
Reputación: 21
xEsk Va por buen camino
Uhm, aqui te he hecho esta chapucilla para ocultar el tray icon, solo que tiene un efecto secundario xDDDD oculta también la hora xD pero intentaré solucionarlo... xDDD
Código Delphi [-]
procedure MostrarTrayIcon(Visible: Boolean);
var
  hWndShell_TrayWnd,
  hWndTrayNotifyWnd: HWND;

begin
  hWndShell_TrayWnd:=FindWindow('Shell_TrayWnd', nil);
  hWndTrayNotifyWnd:=FindWindowEx(hWndShell_TrayWnd, 0, 'TrayNotifyWnd', nil);
  // ocultamos/mostramos el TrayNotify (también se oculta la hora xDD)
  if (hWndTrayNotifyWnd <> 0) then
    begin
      if Visible then // mostramos
        ShowWindow(hWndTrayNotifyWnd, SW_SHOWNORMAL)
      else // ocultamos
        ShowWindow(hWndTrayNotifyWnd, SW_HIDE);
    end;
end;

Uso:
Código Delphi [-]
MostrarTrayIcon(True); // vuelve a mostrar el TrayIcon
MostrarTrayIcon(False); // oculta el TrayIcon

Última edición por xEsk fecha: 13-01-2008 a las 02:32:56.
Responder Con Cita