Solved

blinking applications in task bar

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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 gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now