Is it possible to minimize a dialog to the taskbar?
Moderators: JRL, Dorian (MJT support)
Is it possible to minimize a dialog to the taskbar?
When minimizing a macro scheduler dialog from the dialogs title bar it always minimizes to the desktop instead of the taskbar. Is it possible to minimize it to the taskbar without having to either double click the icon in the taskbar or right clicking it and then clicking minimize?
Thank you for your time.
Thank you for your time.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
No, I'm afraid not. That would need a modification to the underlying window class. I'll make a note to investigate whether or not its possible to make this an option for dialogs in future.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Note, this is possible with V12 via the new dialog objects's OnTaskBar property.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- CyberCitizen
- Automation Wizard
- Posts: 724
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
That's great, pity work wont shell out for v12, Been using MS since v4 (2002 I Think) but now I am stuck with v11 & the problem with the dialog designer where you can not edit the background of the dialog (F11). Having to do it manually is a bit of a pain.mtettmar wrote:Note, this is possible with V12 via the new dialog objects's OnTaskBar property.
FIREFIGHTER
I took the example macro that comes with v12 called "Dialogs - Calculator" and modified the OnTaskBar property to be True instead of False and it does work... however there is no minimize control on the dialog, only the X to close it... so I had to use Windows Key-D (minimize everything) to test this.mtettmar wrote:Note, this is possible with V12 via the new dialog objects's OnTaskBar property.
Then I checked all the other dialog examples and all were the same in that they all didn't have a minimize control.
So this begs the question, what if I want a minimize control on my dialog, or a maximize control for that matter... what property do I alter to get those to appear? I looked at the Help file of course...
...but the above were the only two entries that mentioned minimizing in any way.Macro Scheduler v12 'Form Properties' Help Topic wrote:Icon
Specifies the icon that appears when the form is minimized. Enter the filename to load an icon onto the form. Note that the icon data is loaded statically into and stored in the dialog and while the file name is also stored for reference there is no dynamic link to that file.
OnTaskBar
Controls whether form should be shown on and minimized to Windows task bar. Note that in a compiled macro this will also cause the main application task bar icon to hide and remain hidden for the duration of the script.
Thanks for any example you might provide Marcus... or any other v12 dialog wizard that might know how to do this.
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -

- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Erm there's a minimize button on my dialog example. If there isn't on yours then just add it - add biMinimize to the BorderIcons property.
With OnTaskBar set to true it will now minimize to the task bar, rather than to just above the task bar as is normal for child windows.
Here's an example of a dialog that you can minimize to task bar:
With OnTaskBar set to true it will now minimize to the task bar, rather than to just above the task bar as is normal for child windows.
Here's an example of a dialog that you can minimize to task bar:
Code: Select all
Dialog>Dialog1
object Dialog1: TForm
Left = 697
Top = 447
HelpContext = 5000
BorderIcons = [biSystemMenu, biMinimize]
Caption = 'CustomDialog'
ClientHeight = 223
ClientWidth = 439
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
ShowHint = True
Position = poScreenCenter
OnTaskBar = True
PixelsPerInch = 96
TextHeight = 13
end
EndDialog>Dialog1
Show>Dialog1,r
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
I agree with JP. None of my provided version 12 dialog sample scripts display any title bar buttons except the X to close. But that's not why I'm here.Erm there's a minimize button on my dialog example. If there isn't on yours then just add it - add biMinimize to the BorderIcons property.
I want to point out to anyone creating a new dialog that they want to be able to minimize to the task bar, there seem to be three properties that need to be set in order to achieve this new and wondrous phenomenon.
If I create a new blank dialog the code looks like this.
Code: Select all
Dialog>Dialog1
object Dialog1: TForm
Left = 603
Top = 101
HelpContext = 5000
BorderIcons = [biSystemMenu]
Caption = 'CustomDialog'
ClientHeight = 223
ClientWidth = 439
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
ShowHint = True
OnTaskBar = False
PixelsPerInch = 96
TextHeight = 13
end
EndDialog>Dialog1
1) Marcus' code includes "biMinimize" under the BorderIcons property, the default dialog designer code does not.
2) Marcus' code has the OnTaskBar property set to "True", the default dialog designer code sets OnTaskBar to "False"
These were already mentioned.
3) Marcus' code also includes a value for the Position property, the dialog designer code does not explicitly set Position to anything and without being set to something, the dialog will not minimize to the task bar.
Hope this is helpful.
Dick
Thanks for confirming what I see JRL. Marcus, it might be beneficial if at least one of the v12 example scripts displayed full title bar buttons... for any users who might want to do this.JRL wrote:I agree with JP. None of my provided version 12 dialog sample scripts display any title bar buttons except the X to close.Erm there's a minimize button on my dialog example. If there isn't on yours then just add it - add biMinimize to the BorderIcons property.
Great observation, thanks JRL. I hate to say it but, shouldn't this be documented somewhere?JRL wrote:3) Marcus' code also includes a value for the Position property, the dialog designer code does not explicitly set Position to anything and without being set to something, the dialog will not minimize to the task bar.
Marcus, if this is indeed the case, then perhaps the default behavior for the dialog designer should be to set Position = poScreenCenter as that would help users who might be wondering why the dialog won't minimize to Taskbar... even though steps 1 and 2 were done.
Take care
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -

- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Maybe, but I'm learning just as much as you guys. I didn't know this was the case. If I did it would either be documented or we'd find out why and change it.jpuziano wrote:Great observation, thanks JRL. I hate to say it but, shouldn't this be documented somewhere?JRL wrote:3) Marcus' code also includes a value for the Position property, the dialog designer code does not explicitly set Position to anything and without being set to something, the dialog will not minimize to the task bar.
We've unleashed a new organism with the new dialog designer and we're all learning and there are bound to be things I wasn't aware of. Expect improvements and/or documentation updates as things crop up over time.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Will do. Thanks Marcus, keep up the great work and congrats on the latest addition to your family.mtettmar wrote:We've unleashed a new organism with the new dialog designer and we're all learning and there are bound to be things I wasn't aware of. Expect improvements and/or documentation updates as things crop up over time.

jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -

With a compiled macro based on Marcus sample settings above I got 2 tabs in the taskbar, when running the *.exe. Can anyone confirm this?
The tab named: "Macro Sheduler" got only the icon shown inside, the tab named: "CustomDialog" represent the dialog.

It seems to have something to do with "OnTaskBar = True". Without setting it to True, there is no second tab in the taskbar, but also the dialog can be minimized only to the lower left edge of the screen an not to the taskbar. Any idea how to get rid off the second tab with the icon insinde?
The tab named: "Macro Sheduler" got only the icon shown inside, the tab named: "CustomDialog" represent the dialog.

It seems to have something to do with "OnTaskBar = True". Without setting it to True, there is no second tab in the taskbar, but also the dialog can be minimized only to the lower left edge of the screen an not to the taskbar. Any idea how to get rid off the second tab with the icon insinde?
regards
migro
migro
Hi Migro,
Create exe
Command Line Options
In there you'll find info on Compile Options:
/HIDE
/NOSYSTRAY
I always use both of those when I compile a macro... to hide the Macro Scheduler window itself and prevent it from showing in the System Tray.
Take care
Sure. Open the Help File, search for these topics:migro wrote:Any idea how to get rid of the second tab with the icon inside?
Create exe
Command Line Options
In there you'll find info on Compile Options:
/HIDE
/NOSYSTRAY
I always use both of those when I compile a macro... to hide the Macro Scheduler window itself and prevent it from showing in the System Tray.
Take care
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -

Hi,
think I responded a little bit to early. It worked well with the dialog sample from Marcus. When I compiled my dialog (with some tabs and dialog handlers) it didn't work as expected.
I stripped down the code of my dialog and I found the piece where it goes miss, but I haven't any idea why. I use this handler to update a tooltip when dialog tabs are changed.
When I comment out the line: "AddDialogHandler>Dialog1,ConfigTab,OnShow,TitelConfigTab" and compile it with /NoSystray /Hide, only one tab is shown in the taskbar. When I leave it in, 2 tabs are shown in the taskbar.
Any ideas or suggestions what causes this behavior?
think I responded a little bit to early. It worked well with the dialog sample from Marcus. When I compiled my dialog (with some tabs and dialog handlers) it didn't work as expected.
I stripped down the code of my dialog and I found the piece where it goes miss, but I haven't any idea why. I use this handler to update a tooltip when dialog tabs are changed.
Code: Select all
// COMPILE_OPTS|H:\SIRONA\Archiv\Macros\Test2.exe|H:\SIRONA\Archiv\Macros\SEB\SEB2.ico|CONSOLE=0|INCLUDES=1| /NOSYSTRAY /HIDE
Dialog>Dialog1
object Dialog1: TForm
Left = 255
Top = 101
HelpContext = 5000
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = 'Custom Dialog'
ClientHeight = 617
ClientWidth = 696
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
Position = poScreenCenter
ShowHint = True
OnTaskBar = True
PixelsPerInch = 96
TextHeight = 13
object LabelToolTip: TLabel
Left = 512
Top = 112
Width = 175
Height = 449
AutoSize = False
Caption = 'Tooltip...'
Color = 11769220
Font.Charset = DEFAULT_CHARSET
Font.Color = clblue
Font.Height = -15
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentColor = False
ParentFont = False
Transparent = True
WordWrap = True
end
object PageControl1: TPageControl
Left = 0
Top = 50
Width = 485
Height = 513
ActivePage = ConfigTab
TabOrder = 0
object ConfigTab: TTabSheet
Caption = 'Backup/Restore'
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 393
end
object NotificationTab: TTabSheet
Caption = 'Notification'
end
end
end
EndDialog>Dialog1
Let>str501=Job-Parameter festlegen:...
Let>str502="Email-Benachrichtigungen aktivieren" ...
AddDialogHandler>Dialog1,ConfigTab,OnShow,TitelConfigTab
AddDialogHandler>Dialog1,NotificationTab,OnShow,TitelNotificationTab
Show>Dialog1,r
SRT>TitelConfigTab
// Tooltip für ConfigTab aktualisieren
SetDialogProperty>Dialog1,LabelToolTip,Caption,str501
END>TitelConfigTab
SRT>TitelNotificationTab
// Tooltip für NotificationTab aktualisieren
SetDialogProperty>Dialog1,LabelToolTip,Caption,str502
END>TitelNotificationTab
Any ideas or suggestions what causes this behavior?
regards
migro
migro