Attila Kovacs 629 Posted April 23, 2023 Am I the only one annoyed that the function 'Close all other pages' (Shift + Ctrl + F4) also closes the welcome page? How much time have you spent in the past 30 years reopening the welcome page? Share this post Link to post
Uwe Raabe 2057 Posted April 23, 2023 I am not affected here. The Welcome Page closes when a project is opened and opens again when it is closed. Share this post Link to post
Attila Kovacs 629 Posted April 23, 2023 Okay, It's a good idea, I can steal that. Share this post Link to post
Attila Kovacs 629 Posted May 2, 2023 (edited) @Uwe Raabe ok, looks like postponing the open/close helped (got AV on closing opening wp from OTA FileNotification events) https://stackoverflow.com/questions/38997386/queue-procedure-call-on-same-main-thread still your solution 😄 by the way, is it possible to auto-dock the wizard's DockableForm's after compiling/instlaling the ota wizard? or should I imitate a layout-combo-enter after loading the dll Edited May 2, 2023 by Attila Kovacs Share this post Link to post
Uwe Raabe 2057 Posted May 2, 2023 More recent Delphi versions have TThread.ForceQueue, which does something similar. Regarding the docking: I never tried it, but as it is a TCustomForm, you should be able to dock it in code. It might be tricky to find the correct target, though. Share this post Link to post
Attila Kovacs 629 Posted May 2, 2023 (edited) Ok, once I find an acceptable release, I may decide to buy it again. After reinstalling the wizard, the tthread version stopped working, so I had to switch to using a timer instead. The only way it would work was if it was loaded at startup. Fortunately, it's becoming more stable now. The annoying undocked wizard windows are now history, at least I'm testing this code and it looks ok: procedure TClipboardWizard.ToggleLayout; var ctx: TRttiContext; AppBuilder: TComponent; AppBuilderType: TRTTIType; cbDesktopKeyPress: TRTTIMethod; Key: Char; begin ctx := TRttiContext.Create; try AppBuilder := Application.FindComponent('AppBuilder'); if AppBuilder <> nil then begin AppBuilderType := ctx.GetType(AppBuilder.ClassType); cbDesktopKeyPress := AppBuilderType.GetMethod('cbDesktopKeyPress'); Key := Chr(VK_RETURN); if cbDesktopKeyPress <> nil then cbDesktopKeyPress.Invoke(AppBuilder, [AppBuilder, TValue.From(Key)]); // cbDesktopKeyPress(Sender: TObject; var Key: Char); end; finally ctx.Free; end; end; Thank you for the input and the ideas. Edited May 2, 2023 by Attila Kovacs Share this post Link to post
Uwe Raabe 2057 Posted May 3, 2023 9 hours ago, Uwe Raabe said: More recent Delphi versions have TThread.ForceQueue It seems it was introduced in 10.2 Tokyo. Share this post Link to post