Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

flash tool bar help

hi all I am wondering if you can help with my problem I am trying to get my windows toolbar to flash when my chat program gets incoming messages from users so I know if sumone is typing

here my code

this is my client code that adds text to richedit

[code]
if egg <> '' then
begin
if GetByTab(egg,0) = 'TEXT' then // send text to all clients
if prefs.FlatCheckBox4.Checked then
begin
txtMain.Lines.Add(datetostr(date) +' '+ timetostr(time) +' '+ GetByTab(egg,1));
SendMessage(txtMain.Handle, EM_SCROLLCARET, 0, 0);
Timer3.Enabled := True; // this is the flash timer
end
else
begin
txtMain.Lines.Add(GetByTab(egg,1));
SendMessage(txtMain.Handle, EM_SCROLLCARET, 0, 0);
Timer3.Enabled := True; // this is the flash timer
end;
end;
[/code]

toolbar flash code

[code]
procedure TForm1.Timer3Timer(Sender: TObject);
begin
FlashWindow(Application.Handle, true);
Timer3.Enabled := false;
end;
[/code]

the problem is it flashs even when I type I like it to only flash when other people send messages can anyone help me??

thanks
Slewis

Comments

  • zibadianzibadian Posts: 6,349Member
    : hi all I am wondering if you can help with my problem I am trying to get my windows toolbar to flash when my chat program gets incoming messages from users so I know if sumone is typing
    :
    : here my code
    :
    : this is my client code that adds text to richedit
    :
    : [code]
    : if egg <> '' then
    : begin
    : if GetByTab(egg,0) = 'TEXT' then // send text to all clients
    : if prefs.FlatCheckBox4.Checked then
    : begin
    : txtMain.Lines.Add(datetostr(date) +' '+ timetostr(time) +' '+ GetByTab(egg,1));
    : SendMessage(txtMain.Handle, EM_SCROLLCARET, 0, 0);
    : Timer3.Enabled := True; // this is the flash timer
    : end
    : else
    : begin
    : txtMain.Lines.Add(GetByTab(egg,1));
    : SendMessage(txtMain.Handle, EM_SCROLLCARET, 0, 0);
    : Timer3.Enabled := True; // this is the flash timer
    : end;
    : end;
    : [/code]
    :
    : toolbar flash code
    :
    : [code]
    : procedure TForm1.Timer3Timer(Sender: TObject);
    : begin
    : FlashWindow(Application.Handle, true);
    : Timer3.Enabled := false;
    : end;
    : [/code]
    :
    : the problem is it flashs even when I type I like it to only flash when other people send messages can anyone help me??
    :
    : thanks
    : Slewis
    :
    You should put the statement to flash the taskbar in the routine, which receives the message. This will cause the flash only to occur if the message is received, and not when the richedit is updated.
  • DevelopmentDevelopment Posts: 222Member
    cheers mate got it :) did you read your mailbox allso??? contact me
    Slewis

Sign In or Register to comment.