#1 Re: Other components » Open Source SynTaskDialog unit for XP,Vista,Seven » 2011-03-26 06:49:03

Well yes and no wink

It gives a different behaviour with the native (Win7) and the emulated (WinXP) version.

With Win7 the ShowMessage Example produces no modal dialog windows and they cannot be closed with ESC!
With WinXP the behaviour is as expected (modal and can be closed with ESC).



Example with a Form with one Button:

procedure MyShowMessage(const Msg, Inst: string; Error: boolean=false);
const
  IconError: array[boolean] of TTaskDialogIcon = (tiInformation, tiError);
var Task: TTaskDialog;
begin
  Task.Inst := Inst;
  Task.Content := Msg;
  Task.Execute([cbOK],mrOk,[],IconError[Error]);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  MyShowMessage('MyMsg', 'MyInst');
end;

#2 Re: Other components » Open Source SynTaskDialog unit for XP,Vista,Seven » 2011-03-25 09:09:42

Using your approach (at least with the examples given) gives some different results compared to the native Vista/7 TaskDialog:

- It doesn't produce a modal dialog !!
- The ShowMessage example cannot be closed by pressing the ESC key (only the return key is assigned to the btOK)

Is there some missed setting needed?

Regards,
Christian

Board footer

Powered by FluxBB