Recent

Author Topic: Win SHBrowseForFolder API, and multiple Dialogs?  (Read 347 times)

d2010

  • Jr. Member
  • **
  • Posts: 62
Win SHBrowseForFolder API, and multiple Dialogs?
« on: October 05, 2024, 09:02:38 am »
 :o 8)
C:Q1=How done  TThread  (exit of Thread)?
--I need put TThread.done before Close(on,'Button5Click');
--I must close & done any Thread.
C:Q2= How to replace MessageBox(0 with InputBox(?
-- The original inputBox failed because , he use Dialogs.Form.pas.

 :-XHello
I want display inputBox at same time with browser-of-folder.
The trick work good, but he=trick failed at display of input box

E.g1=I want display MessageBox( and Brower-of-folder
I known , i must avoid Delphi.dfm Or Lazarus form.lfm
Best Regards.
Hint01= You must search ??? inside this message
 Hint02= You must search ??? inside this source *dpr

Code: [Select]
type
  TTLSThread = class(TThread)
  private
    FNewStr: String;
    Fidx:word;
  protected
    procedure Execute; override;
  public
    constructor Create(index:word;const ANewStr: String);
    deconstructor ArtDone(???);
    procedure finalize(exew:word);???
  end;

Optionally question/s?
O:Q3= Can I replace title  of "BrowseFolder"?
O:Q4= How to replace MessageBox(0 with "
"ProgressBar of TimeTicks" isinside "Test_yes&no".dfm
The user,  he don~t select folder in max3sec=3000ticks, then
BrowseFolder is he cancelled.


The main questions are C:Q1 and C:Q2.
Code: [Select]
procedure SetShowStr(index:word;const S: String);
begin
   if (index>=high(GlobalAsk)) then index:=00;
   Case index and 03  of
00: Begin  GlobalAsk[index].Tik:=Now;
           GlobalAsk[index].com:=MessageBox(0, pchar(s),@GlobalTit[0], MB_YESNOCANCEL);
    End;
01: Begin
           GlobalAsk[index].Tik:=Now;???
           HostEditInput:=Trim(Dialogs.InputBox('FileName= ','CodeHere', '*'))+#13#10;
    End;
02: Begin
          GlobalAsk[index].Tik:=Now;
          MessageBox_SHBrowseForFolder_i02('C:\','');
    End;     
  End;
end;
« Last Edit: October 09, 2024, 08:20:32 pm by d2010 »

 

TinyPortal © 2005-2018