TAdvSmoothMessageDialog lost Application focus

Hello,

I use TAdvSmoothMessageDialog on an form.
After the AdvSmoothMessageDialog.ExecuteDialog; application lst focus.
With Application.MessageBox('test', 'test') is ok.

How can prevent application lost focus when using AdvSmoothMessageDialog?



Best regards

I cannot see a different between the Application.MessageBox test and the TAdvSmoothMessageDialog test.

Both lose the focus on the main form, can you perhaps send us a sample that shows the difference between the two with the exact test settings?

Kind Regards, 
Pieter

Hello,

Yes! Both lose the focus on the main form, but when message was close, last control doesn't  receive focus.
I need to make clik on the main form to receive focus last control.



An sample test

unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    edt1: TEdit;
    btnTms: TSpeedButton;
    btnVCL: TSpeedButton;
    advsmthmsgdlg1: TAdvSmoothMessageDialog;
    procedure btnTmsClick(Sender: TObject);
    procedure btnVCLClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.btnTmsClick(Sender: TObject);
begin
  advsmthmsgdlg1.ExecuteDialog;
end;

procedure TForm1.btnVCLClick(Sender: TObject);
begin
  Application.MessageBox('test', 'test')
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  ActiveControl := edt1;
end;

end.





Best regards

I see no issues here with the focus, the focus is set on the Edit, when clicking on the button, the focus is set on the button. Then the dialog is shown which gains focus, afterwards, the button has focus again. I am testing this here on XE2. Which environment are you testing the components on?


Kind Regards, 
Scheldeman Pieter

Hello,

I have found that this behavior is given by TeamViewer Quick Connect.
If I disable the TeamViewer Quick Connect everything is normal.


Thanks,
Tiberiu Stoicescu