Forum > Windows (32/64)
Dialogs and Windows PE
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?
d2010:
--- Quote from: atasoft on March 05, 2024, 08:43:06 am ---Hi,
I am trying to write a program to select disk drive and path.
--- End quote ---
C:A1=I understand in Win_XP Live .iso, this code line , bellow not exist:
--- Code: --- SHGetPathFromIDList(PItemIDList(lParam), @PathName);
--- End code ---
because only WinVista+ have got the " SHGetPathFromIDList"
d2010:
I found very funny solution.
If the user cancel-select one file, then Open1click switch between
OldStyleDialog and NewStyleDialog
C:Q1=How to exclude ofOldStyleDialog from OpenDialog7vlax.Options?
Tag: you search ??? inside code-source.
C:Q2=How include at line 002:at bottom source?
Thank you.
--- Code: ---procedure TMainForm.Open1Click(Sender: TObject);
Var k,i:integer;
euda:boolean;
savc:string;
begin
case ord(Open1.checked) of
001: OpenDialog7vlax.Options:= [ofOldStyleDialog];
000://exclude(ofOldStyleDialog,OpenDialog7vlax.Options);
???
002: include(
ofOldStyleDialog,OpenDialog7vlax.Options); ??
end;
euda:=OpenDialog7vlax.Execute;
if (euda=false) then
Begin Open1.checked:=not Open1.checked;
case Open1.checked of
true: StatusBar1.SimpleText:='If true then You switch to Window98Style TOpenDialog';
fals: StatusBar1.SimpleText:='If false then You switch to WindowXP TOpenDialog';
End; exit;
End;
if (euda)and(length(OpenDialog7vlax.FileName)<2) then
Begin OpenDialog7vlax.initialdir:=h_string.vl_registry_readsir('devinfo_t122','');
Exit;
End;
vla_rtf_ActiveLayout(kVpRegenType_upr+10,OpenDialog7vlax.FileName,RichEdit1);
openfiles_exe_mui(OpenDialog7vlax.FileName,RichEdit1);
VLISp_NormalCompile.enabled:=true;
End;
--- End code ---
marcov:
Try
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---OpenDialog7vlax.Options:= OpenDialog7vlax.Options - [ofOldStyleDialog];
d2010:
--- Quote from: marcov on February 06, 2025, 11:40:36 am ---Try
--- End quote ---
Yes, thank you ,work great. O:-)
Navigation
[0] Message Index
[*] Previous page