Langage :
Delphi 5
Date ajout :
21/03/2006
Posté par
ni69
[
Liste]
DateMAJ :
05/08/2006
FlashWindow(Application.Handle, True);
// Possibilité d'implémentation dans un timer (intervalle conseillé: 1000) :
procedure TForm1.Timer1Timer(Sender: TObject);
begin
FlashWindow(Application.Handle, True);
end;
Remarque :
Sous D7 pas besoin de timer, un simple appel a FlashWindow(Application.Handle,true); permet de faire clignoter par defaut le titre de l'application dans la barre des taches, on peu egalement utiliser la fonction sur le handle d'un objet TForm pour en faire clignoter disctrement le cadre et le titre. f0xi.
Private Declare Function FlashWindow Lib "user32" (ByVal hwnd As Integer, ByVal bInvert As Integer) As Integer
Private Const Invert As Integer = 1
'// Exemple d'implémentation dans un timer (intervalle conseillé : 1000) :
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
FlashWindow(Me.Handle.ToInt32, Invert)
End Sub
[System.Runtime.InteropServices.DllImport("user32.dll")]
private static extern bool FlashWindow(IntPtr hwnd, bool bInvert);
public static void FlashWindow(System.Windows.Forms.Form form, bool invert)
{
FlashWindow(form.Handle, invert);
}
Private Declare Function FlashWindow Lib "user32" (ByVal hwnd As Long, ByVal bInvert As Long) As Long
Private Const Invert As Long = 1
'// Exemple d'implémentation dans un timer (intervalle conseillé : 1000) :
Private Sub Timer1_Timer()
Call FlashWindow(Me.hwnd, Invert)
End Sub
Remarque :
Vous devez avoir créer un Timer nommé Timer1 sur votre formulaire avec un intervalle de 1000ms