Forum > Windows (32/64)

Dialogs and Windows PE

<< < (2/2)

atasoft:

--- Quote from: atasoft on March 05, 2024, 12:08:41 pm ---Thank you very much Bart. TOpenDialog and TSaveDialog is working on Windows PE changing the options to old style dialog. TSelectDirectoryDialog does NOT work.

Solution:

procedure TMainForm.btnSaveDlgClick(Sender: TObject);
var
  FileName: String;
  sd: TSaveDialog;
begin
  sd := TSaveDialog.Create(Self);
  sd.Options := [ofOldStyleDialog]; // Set old style dialog to avoid Access Violation under Windows PE
  try
    if not sd.Execute then Exit; // Access Violation under Windows PE
    FileName:=sd.FileName;
    edtPath.Text:=FileName;
  finally
    sd.Free;
  end;
end;

--- End quote ---

The above solution works but I can not resize the dialog although I set ofEnableSizing in Options.
My problem is the small width of dialog components (Editbox and ListBox).

Is there a solution or do I have to create my own dialog?

Navigation

[0] Message Index

[*] Previous page

Go to full version