Solved

blinking applications in task bar

Posted on 2004-08-03
4
269 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 12

Expert Comment

by:esoftbg
ID: 11704667
0
 
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 250 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help on project with Soap 10 70
Correct Component for Shopping Cart. 2 136
Delphi 2 91
Convert a string into a TDateTime 5 80
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

751 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