FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   Add to FavoritesAdd to Favorites  * Code Snippets
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    RSS Get RSS Feed  


Is it possible to minimize a dialog to the taskbar?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Macro Scheduler and Windows Automation Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
Rain
Automation Wizard


Joined: 09 Aug 2005
Posts: 550

Reputation: 311.5
votes: 28

PostPosted: Tue Mar 23, 2010 6:18 pm    Post subject: Is it possible to minimize a dialog to the taskbar? Reply with quote

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.
_________________
Running Macro Scheduler 13.2.4 on Windows 7 Ultimate

Some of my Scripts I'm sharing with the world



Did this message help you? If so please reward the poster with Reputation Points? Reward Points
Back to top
View user's profile Send private message Visit poster's website
Marcus Tettmar
Site Admin


Joined: 19 Sep 2002
Posts: 5640
Location: Dorset, UK
Reputation: 1391
votes: 58

PostPosted: Tue Mar 23, 2010 8:23 pm    Post subject: Reply with quote

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?

Did this message help you? If so please reward the poster with Reputation Points? Reward Points
Back to top
View user's profile Send private message Visit poster's website Facebook ID
Rain
Automation Wizard


Joined: 09 Aug 2005
Posts: 550

Reputation: 311.5
votes: 28

PostPosted: Mon Apr 19, 2010 3:22 pm    Post subject: Reply with quote

Thanks Marcus.
_________________
Running Macro Scheduler 13.2.4 on Windows 7 Ultimate

Some of my Scripts I'm sharing with the world



Did this message help you? If so please reward the poster with Reputation Points? Reward Points
Back to top
View user's profile Send private message Visit poster's website
Marcus Tettmar
Site Admin


Joined: 19 Sep 2002
Posts: 5640
Location: Dorset, UK
Reputation: 1391
votes: 58

PostPosted: Mon Apr 19, 2010 3:33 pm    Post subject: Reply with quote

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?

Did this message help you? If so please reward the poster with Reputation Points? Reward Points
Back to top
View user's profile Send private message Visit poster's website Facebook ID
CyberCitizen
Automation Wizard


Joined: 20 Jun 2004
Posts: 509
Location: Adelaide, South Australia
Reputation: 171.7
votes: 13

PostPosted: Fri May 21, 2010 3:43 am    Post subject: Reply with quote

mtettmar wrote:
Note, this is possible with V12 via the new dialog objects's OnTaskBar property.

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.
_________________
FIREFIGHTER

Did this message help you? If so please reward the poster with Reputation Points? Reward Points
Back to top
View user's profile Send private message Send e-mail MSN MessengerFacebook ID
jpuziano
Automation Wizard


Joined: 30 Oct 2004
Posts: 1067

Reputation: 207.8
votes: 20

PostPosted: Fri May 21, 2010 5:28 am    Post subject: Reply with quote

mtettmar wrote:
Note, this is possible with V12 via the new dialog objects's OnTaskBar property.

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.

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...

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.

...but the above were the only two entries that mentioned minimizing in any way.

Thanks for any example you might provide Marcus... or any other v12 dialog wizard that might know how to do this.
_________________
jpuziano

Note: When posting code to the forum... please:
- highlight the code then click the "Code" button
- check the "Disable HTML in this post" checkbox
- check the "Disable Smilies in this post" checkbox

Did this message help you? If so please reward the poster with Reputation Points? Reward Points
Back to top
View user's profile Send private message
Marcus Tettmar
Site Admin


Joined: 19 Sep 2002
Posts: 5640
Location: Dorset, UK
Reputation: 1391
votes: 58

PostPosted: Fri May 21, 2010 9:23 am    Post subject: Reply with quote

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:


_________________
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Did this message help you? If so please reward the poster with Reputation Points? Reward Points
Back to top
View user's profile Send private message Visit poster's website Facebook ID
JRL
Automation Wizard


Joined: 10 Jan 2005
Posts: 2651
Location: Iowa
Reputation: 993.5
votes: 91

PostPosted: Fri Jun 04, 2010 10:29 pm    Post subject: Reply with quote

Quote:
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 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.

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.



Notice three major differences between this code and the code Marcus posted.

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
_________________
A few homemade utilities

Did this message help you? If so please reward the poster with Reputation Points? Reward Points
Back to top
View user's profile Send private message
jpuziano
Automation Wizard


Joined: 30 Oct 2004
Posts: 1067

Reputation: 207.8
votes: 20

PostPosted: Sat Jun 05, 2010 4:46 pm    Post subject: Reply with quote

JRL wrote:
Quote:
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 agree with JP. None of my provided version 12 dialog sample scripts display any title bar buttons except the X to close.

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:
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.

Great observation, thanks JRL. I hate to say it but, shouldn't this be documented somewhere?

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: When posting code to the forum... please:
- highlight the code then click the "Code" button
- check the "Disable HTML in this post" checkbox
- check the "Disable Smilies in this post" checkbox

Did this message help you? If so please reward the poster with Reputation Points? Reward Points
Back to top
View user's profile Send private message
Marcus Tettmar
Site Admin


Joined: 19 Sep 2002
Posts: 5640
Location: Dorset, UK
Reputation: 1391
votes: 58

PostPosted: Mon Jun 07, 2010 9:03 am    Post subject: Reply with quote

jpuziano wrote:

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.

Great observation, thanks JRL. I hate to say it but, shouldn't this be documented somewhere?


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.

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?

Did this message help you? If so please reward the poster with Reputation Points? Reward Points
Back to top
View user's profile Send private message Visit poster's website Facebook ID
jpuziano
Automation Wizard


Joined: 30 Oct 2004
Posts: 1067

Reputation: 207.8
votes: 20

PostPosted: Mon Jun 07, 2010 5:53 pm    Post subject: Reply with quote

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.

Will do. Thanks Marcus, keep up the great work and congrats on the latest addition to your family. Smile
_________________
jpuziano

Note: When posting code to the forum... please:
- highlight the code then click the "Code" button
- check the "Disable HTML in this post" checkbox
- check the "Disable Smilies in this post" checkbox

Did this message help you? If so please reward the poster with Reputation Points? Reward Points
Back to top
View user's profile Send private message
migro
Pro Scripter


Joined: 06 Nov 2003
Posts: 130
Location: Germany
Reputation: 64

PostPosted: Tue Dec 27, 2011 7:01 pm    Post subject: Reply with quote

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?
_________________
regards
migro

Did this message help you? If so please reward the poster with Reputation Points? Reward Points
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jpuziano
Automation Wizard


Joined: 30 Oct 2004
Posts: 1067

Reputation: 207.8
votes: 20

PostPosted: Tue Dec 27, 2011 8:11 pm    Post subject: Reply with quote

Hi Migro,

migro wrote:
Any idea how to get rid of the second tab with the icon inside?

Sure. Open the Help File, search for these topics:
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: When posting code to the forum... please:
- highlight the code then click the "Code" button
- check the "Disable HTML in this post" checkbox
- check the "Disable Smilies in this post" checkbox

Did this message help you? If so please reward the poster with Reputation Points? Reward Points
Back to top
View user's profile Send private message
migro
Pro Scripter


Joined: 06 Nov 2003
Posts: 130
Location: Germany
Reputation: 64

PostPosted: Tue Dec 27, 2011 8:38 pm    Post subject: Reply with quote

Hi Jpuziano,

thanks a lot for the hint - it works.

I never used "/hide" before, because I didn't got the clou from the help text and thought it will hide the dialog window itself.... Wink
_________________
regards
migro

Did this message help you? If so please reward the poster with Reputation Points? Reward Points
Back to top
View user's profile Send private message Send e-mail Visit poster's website
migro
Pro Scripter


Joined: 06 Nov 2003
Posts: 130
Location: Germany
Reputation: 64

PostPosted: Tue Dec 27, 2011 10:43 pm    Post subject: Reply with quote

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?
_________________
regards
migro

Did this message help you? If so please reward the poster with Reputation Points? Reward Points
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:    View previous topic :: View next topic  
Post new topic   Reply to topic    Macro Scheduler and Windows Automation Forum Index -> General Discussion All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group