Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

blinking applications in task bar

Posted on 2004-08-03
4
Medium Priority
?
274 Views
Last Modified: 2010-04-04
When receiving a message from socket connection I need to open myform (minimized) and blink my application in task bar...

 How may I blink my application in task bar?

0
Comment
Question by:faustomen
  • 2
4 Comments
 
LVL 11

Expert Comment

by:Jase-Coder
ID: 11705584
hi there is an Api and to inmplement it do:

flashwindow(form1.handle, true);
0
 
LVL 12

Accepted Solution

by:
esoftbg earned 1000 total points
ID: 11706025
program Q_21080519;

uses
  Forms,
  Windows,
  Unit1 in 'Unit1.pas' {Form1};

{$R *.res}

begin
  Application.Initialize;
  Application.ShowMainForm := False;
  Application.CreateForm(TForm1, Form1);
  ShowWindow(Application.MainForm.Handle, SW_HIDE);
  ShowWindow(Application.Handle, SW_MINIMIZE);
  Application.Run;
end.

//........

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Buttons, ExtCtrls;

type
  TForm1 = class(TForm)
    SpeedButtonStopBlink: TSpeedButton;
    OpenDialog: TOpenDialog;
    Timer: TTimer;
    SpeedButtonBlink: TSpeedButton;
    procedure FormCreate(Sender: TObject);
    procedure TimerTimer(Sender: TObject);
    procedure SpeedButtonStopBlinkClick(Sender: TObject);
    procedure SpeedButtonBlinkClick(Sender: TObject);
  private   { Private declarations }
  public    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
  Timer.Enabled := True;
end;

procedure TForm1.TimerTimer(Sender: TObject);
begin
  FlashWindow(Application.Handle, True);
end;

procedure TForm1.SpeedButtonBlinkClick(Sender: TObject);
begin
  Timer.Enabled := True;
end;

procedure TForm1.SpeedButtonStopBlinkClick(Sender: TObject);
begin
  Timer.Enabled := False;
end;

end.
0
 
LVL 2

Expert Comment

by:DarkCore_
ID: 11712867
Just a notation, if you look into the first comment of esoftbg, is the correct answer, but alert, FlashWindowEx is only implemented in Windows 98 SE or higher. If your program needs to run on a Windows 95, then you must use the timer.

Edu
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question