Is there a way to avoid hidden forms showing up in the taskbar mini window control panel?

This is for a Delphi application with a child form that was shown and then hidden but not released. If the user hovers over the taskbar (Windows 10) "mini-view" of the application, hidden forms become visible (on hover). They will hide when the user clicks on the mini-view to change focus to the application. Is there a way to avoid this?

To recreate:

  • Create a new VCL Forms Application.
  • Add a new shape to the project and set it to auto-create.
  • Add a button to show and then hide the form (or open it with ShowModal).
  • Run the application
  • Click the button to display the second form, and then close it.
  • Hover over the application taskbar button to display a mini-view of the main window.
  • Hover over the mini-view and see the hidden windows appear on the main form.

Note that minimizing the application and restoring it "captures" the impact until the next form display. Perhaps this is a clue to what is causing this or a hint for a worker? It's not a huge problem as it doesn't cause any real problems, but it looks unprofessional.

Adding code as requested (It won't be very interesting though.)

program Project1;
uses
  Vcl.Forms,
  Unit1 in 'Unit1.pas' {Form1},
  Unit2 in 'Unit2.pas' {Form2};
{$R *.res}
begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.CreateForm(TForm1, Form1);
  Application.CreateForm(TForm2, Form2);
  Application.Run;
end.

// Only code that was added to TForm1:
procedure TForm1.Button1Click(Sender: TObject);
begin
  // Show and then hide the form or use ShowModal and close it before testing the hover.
  Form2.Show;
  Form2.Hide;
  // Form2.ShowModal;
end;

      


Update. How to show the problem using only Delphi environment.

  • Start Delphi
  • Open any code file and find the line and then use F3 until you get the "Search not found" dialog, "Restart search from the beginning of the file".
  • Close the "Search Not Found" box in step 2.
  • Hover your mouse over the Delphi taskbar button and then move it to the mini preview.
  • The "Search Match Not Found" window appears in the main Delphi window. I have tested this in Berlin and Tokyo (10.2.1).
+3


source to share


1 answer


It looks like Dave Olson's comment that this is a specific version of Windows is correct. This issue seems to have completely disappeared in recent versions of Windows 10 (even when used with older compiled versions of programs that would show the problem earlier). As an aside, I wonder if there were people who were unable to reproduce the issue were Windows Insider Program and new versions.



0


source







All Articles