Fórum Pisca Pisca no minimizado do ChatClient #177044
23/08/2003
0
Obrigado
Sergio Luiz
Curtir tópico
+ 0Posts
24/08/2003
Aroldo Zanela
No evento que manipula o recebimento de mensagem adicione o seguinte código (substituir Form1 pelo nome do seu formulário);
SetForegroundWindow(Form1.Handle);
Gostei + 0
24/08/2003
Cebikyn
Para usar a [b:22bf41c806]FlashWindowEx[/b:22bf41c806], declare:
type TFlashWInfo = record cbSize : LongInt; hWndMe : LongInt; dwFlags : LongInt; uCount : LongInt; dwTimeout : LongInt; end;
Depois use:
var FWinfo: TFlashWInfo; begin with FWinfo do begin cbSize := 20; hwnd := Application.Handle; // O handle do aplicativo dwflags := FLASHW_ALL; ucount := 10; // número de vezes para piscar dwtimeout := 0; // Tempo entre alternar as cores (0 é o padrão) end; FlashWindowEx(FWinfo); end;
Você pode trocar [b:22bf41c806]FLASH_ALL[/b:22bf41c806] por:
FLASHW_STOP = 0 FLASHW_CAPTION = 1 // Pisca apenas a barra de título FLASHW_TRAY = 2 // Pisca o botão da barra de tarefas FLASHW_ALL = 3 // Pisca o botão e a barra de título FLASHW_TIMER = 4 // Pisca até que a função seja // chamada com o FLASHW_STOP FLASHW_TIMERNOFG = 5 // Pisca até a janela ter foco
Caso esta função não funcione na sua versão do Windows, deixe uma msg que eu coloco como usar a [b:22bf41c806]FlashWindow[/b:22bf41c806].
Gostei + 0
24/08/2003
Aroldo Zanela
Colega,
SetForegroundWindow faz exatamente isso.
Gostei + 0
24/08/2003
Cebikyn
Colega,
SetForegroundWindow faz exatamente isso.[/quote:e90b5b24a3]
Não sabia, eu apenas li este trecho do site do Micro$oft:
e já achei que a função não piscasse a janela... acho que esta parte de piscar esta implícita em ´[i:e90b5b24a3]various visual cues[/i:e90b5b24a3]´...
Gostei + 0
24/08/2003
Aroldo Zanela
Windows NT 5.0 will not allow an application to force a window to the foreground while the user is working with another window. Instead, SetForegroundWindow will activate the window (see SetActiveWindow) and call the FlashWindowEx function to notify the user.
Gostei + 0
26/08/2003
Cebikyn
Windows NT 5.0 will not allow an application to force a window to the foreground while the user is working with another window. Instead, SetForegroundWindow will activate the window (see SetActiveWindow) and call the FlashWindowEx function to notify the user.[/quote:e6ed95f93b]
Como eu disse, eu apenas li [b:e6ed95f93b]aquele[/b:e6ed95f93b] trecho... :D
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)