Solved

blinking applications in task bar

Posted on 2004-08-03
4
267 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 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

828 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