Recent

Author Topic: Application Title ??  (Read 8766 times)

young_nandy

  • New Member
  • *
  • Posts: 41
Application Title ??
« on: December 03, 2018, 06:59:46 am »
How do I make the application title always installed on the taskbar even though the main form is hide?

sash

  • Sr. Member
  • ****
  • Posts: 366
Re: Application Title ??
« Reply #1 on: December 03, 2018, 10:15:51 am »
Since "taskbar" aka "window buttons panel" (for most Desktop Environments) represents visible windows on desktop - you can't.
« Last Edit: December 03, 2018, 10:18:13 am by sash »
Lazarus 2.0.10 FPC 3.2.0 x86_64-linux-gtk2 @ Ubuntu 20.04 XFCE

balazsszekely

  • Guest
Re: Application Title ??
« Reply #2 on: December 03, 2018, 11:45:46 am »
MainForm.Visible <> MainForm visible to the user. Set MainForm.Left to 10000 and you're good to go.

young_nandy

  • New Member
  • *
  • Posts: 41
Re: Application Title ??
« Reply #3 on: December 03, 2018, 02:39:32 pm »
MainForm.Visible <> MainForm visible to the user. Set MainForm.Left to 10000 and you're good to go.

I do not understand what it means. but I try
Application.Mainform.left: = 10000;

1.on event "onshow" at form2 (not my mainform) ==> result (application.title) does not come out on the taskbar

2. in the project source ==> the result is an error.

Can you explain in more detail?

young_nandy

  • New Member
  • *
  • Posts: 41
Re: Application Title ??
« Reply #4 on: December 03, 2018, 02:45:52 pm »
Since "taskbar" aka "window buttons panel" (for most Desktop Environments) represents visible windows on desktop - you can't.

since I used Delphi 7, the application title problem never happened like this on Windows XP or Windows 7.

Then when I tried this Lazarus, I found a problem like this. I tried on Embarcadero 10.2 Tokyo also has a problem like this.

Is there a way to overcome this problem? Please also note that I tried Lazarus on Windows 10.

bobix

  • Jr. Member
  • **
  • Posts: 71
    • http://rechnik-bg.com
Re: Application Title ??
« Reply #5 on: December 03, 2018, 03:42:11 pm »
Quote
I do not understand what it means. but I try
Application.Mainform.left: = 10000;
Its Mainform.left: = 10000; without Application.
Lazarus 1.8.4 r57972 FPC 3.0.4 i386-win32-win32/win64

creaothceann

  • Full Member
  • ***
  • Posts: 117
Re: Application Title ??
« Reply #6 on: December 03, 2018, 06:32:22 pm »
How do I make the application title always installed on the taskbar even though the main form is hide?
What OS?

MainForm.Visible <> MainForm visible to the user. Set MainForm.Left to 10000 and you're good to go.
How does that work with multimonitor configurations?

https://youtu.be/Bteq-6D1srs
https://youtu.be/0jSxvjT6Ec0
https://youtu.be/NMvC4zikMuo
https://youtu.be/uGSfliYZO-Q
https://youtu.be/Toft6fMvByA

ASerge

  • Hero Member
  • *****
  • Posts: 2223
Re: Application Title ??
« Reply #7 on: December 03, 2018, 07:05:55 pm »
since I used Delphi 7, the application title problem never happened like this on Windows XP or Windows 7.
In Delphi 7, the application window (on the taskbar) is also hidden when the main form is hidden.
It's not very clear to me why this behavior is necessary, and how to manage a hidden application afterwards, but you can use an empty one instead of the main window with BorderStyle = bsNone; and Height = 0; and show/hide another window.

sash

  • Sr. Member
  • ****
  • Posts: 366
Re: Application Title ??
« Reply #8 on: December 03, 2018, 09:46:42 pm »
In Delphi 7, the application window (on the taskbar) is also hidden when the main form is hidden.

As I said above, window button on a taskbar is always hidden when corresponding app's window is hidden. It is a functionality of Desktop Environment, not application.

And yes, it is quite unclear, why someone needs to hide a window, but keep taskbar button visible. Looks more like a minimize behavior.
More often they need an opposite action: hide button from taskbar (optionally move icon to the tray) but keep window visible.
Lazarus 2.0.10 FPC 3.2.0 x86_64-linux-gtk2 @ Ubuntu 20.04 XFCE

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Application Title ??
« Reply #9 on: December 03, 2018, 09:56:54 pm »
Looks more like a minimize behavior.

Indeed! And that's one possible way to implement it: Minimize the application and intercept/ignore any request to restore it. Doesn't sound so difficult, does it?
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Application Title ??
« Reply #10 on: December 03, 2018, 11:46:25 pm »

As I said above, window button on a taskbar is always hidden when corresponding app's window is hidden. It is a functionality of Desktop Environment, not application.

And yes, it is quite unclear, why someone needs to hide a window, but keep taskbar button visible. Looks more like a minimize behavior.

Indeed, I wonder if what you (young_nandy) really want is the TrayIcon ?  Sounds like you are using Windows, it works fine on Windows. Maybe you should have a look at how it works....

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

young_nandy

  • New Member
  • *
  • Posts: 41
Re: Application Title ??
« Reply #11 on: December 04, 2018, 06:47:30 am »
Quote
I do not understand what it means. but I try
Application.Mainform.left: = 10000;
Its Mainform.left: = 10000; without Application.

Sorry, the correct one is application.mainform.left

I will explain later below. I already understood the meaning of this trick.

young_nandy

  • New Member
  • *
  • Posts: 41
Re: Application Title ??
« Reply #12 on: December 04, 2018, 06:52:16 am »
since I used Delphi 7, the application title problem never happened like this on Windows XP or Windows 7.
In Delphi 7, the application window (on the taskbar) is also hidden when the main form is hidden.
It's not very clear to me why this behavior is necessary, and how to manage a hidden application afterwards, but you can use an empty one instead of the main window with BorderStyle = bsNone; and Height = 0; and show/hide another window.

please see the trick from "GetMem".

I will explain below. what I need is when form1 moves to form2, application title still exits on the taskbar. I use the following script

form2.show;
form1.hide;

young_nandy

  • New Member
  • *
  • Posts: 41
Re: Application Title ??
« Reply #13 on: December 04, 2018, 06:55:09 am »
Looks more like a minimize behavior.

Indeed! And that's one possible way to implement it: Minimize the application and intercept/ignore any request to restore it. Doesn't sound so difficult, does it?

Thank you for the idea, but I prefer the trick from "GetMem". mainform is not visible

young_nandy

  • New Member
  • *
  • Posts: 41
Re: Application Title ??
« Reply #14 on: December 04, 2018, 06:57:34 am »

As I said above, window button on a taskbar is always hidden when corresponding app's window is hidden. It is a functionality of Desktop Environment, not application.

And yes, it is quite unclear, why someone needs to hide a window, but keep taskbar button visible. Looks more like a minimize behavior.

Indeed, I wonder if what you (young_nandy) really want is the TrayIcon ?  Sounds like you are using Windows, it works fine on Windows. Maybe you should have a look at how it works....

Davo

I know about this trick. but using icontray. the application doesn't look like it's running.

 

TinyPortal © 2005-2018