Ariane Soft PPL2 Pocket Programming DataMite
  #1  
Old 07-17-2009, 01:08 PM
Mike Halliday Mike Halliday is offline
Senior Member
 
Join Date: Sep 2007
Location: Warrington, United Kingdom
Posts: 821
Send a message via Skype™ to Mike Halliday
Default Minimise app to tray (taskbar)

I know that PPL does not allow you to create tray-icon based applications (IE applications that are minimised, but hidden to the system tray) - This is shame but probably difficult to do for Alain at the moment.

I have a solution (of sorts) - mainly for testing purposes

www.trayit.com - allows any app to be minimised and placed in the system tray.

I guess that if a PPL app was written that incuded a timer to execute events when needed, then it could be made 'resident' with trayit and would still work (timer and all) - I have not tried this yet, but will give it a go and see what happens!

I have compiled one of my sample apps, and it indeed does get minimised to the tray

Probably of no use to anyone, but I may find a use for it in the future.
Reply With Quote
  #2  
Old 07-17-2009, 07:52 PM
Nicknack Nicknack is offline
Senior Member
 
Join Date: Nov 2006
Location: Germany
Posts: 527
Default

trust the force of ppl...unbeliever!!!
Attached Files
File Type: zip notify.zip (438.7 KB, 138 views)
Reply With Quote
  #3  
Old 07-18-2009, 01:38 PM
Nicknack Nicknack is offline
Senior Member
 
Join Date: Nov 2006
Location: Germany
Posts: 527
Thumbs up

here is the source with the appendant form
abstract approach/structure is:
1. in form init you find the needed definitions,declarations and the extra function On_Icon which handles the messages of our tray icon.
2. on form creation we first get the icon out of our exe/ppl file and then notify the icon to the tray.
3. when the button is clicked the form is minimized with Form_Hide, when the tray icon is clicked the form comes back with Form_Show
4. on form close we delete the tray icon.

I tried to add a description to the tray icon, but it caused the program to crash on close, therefore it's commented.

@Robotop: so actually the form resumes when you click on the tray icon, but I didn't make a WM_LBUTTONDOWN catch in my old exe, therefore the form also resumed when you moved your mouse over it.
Attached Files
File Type: zip notify_source.zip (3.4 KB, 126 views)

Last edited by Nicknack; 07-18-2009 at 01:42 PM.
Reply With Quote
  #4  
Old 11-25-2009, 09:31 AM
Kobus Kobus is offline
Senior Member
 
Join Date: Feb 2009
Location: Spain
Posts: 141
Default

Heyyyy Nicknack,

Still searching for my multiple forms I ran into this topic.

You're a genious! and I will certainly use your minimize.

Gracias,
Helen.
Reply With Quote
  #5  
Old 11-25-2009, 09:39 AM
Mike Halliday Mike Halliday is offline
Senior Member
 
Join Date: Sep 2007
Location: Warrington, United Kingdom
Posts: 821
Send a message via Skype™ to Mike Halliday
Default

Quote:
Originally Posted by Nicknack View Post
here is the source with the appendant form
abstract approach/structure is:
1. in form init you find the needed definitions,declarations and the extra function On_Icon which handles the messages of our tray icon.
2. on form creation we first get the icon out of our exe/ppl file and then notify the icon to the tray.
3. when the button is clicked the form is minimized with Form_Hide, when the tray icon is clicked the form comes back with Form_Show
4. on form close we delete the tray icon.

I tried to add a description to the tray icon, but it caused the program to crash on close, therefore it's commented.

@Robotop: so actually the form resumes when you click on the tray icon, but I didn't make a WM_LBUTTONDOWN catch in my old exe, therefore the form also resumed when you moved your mouse over it.

Totally missed that post until today.

Thanks NickNack. Will have a look at it and see if it allows me to do what I want!

M.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:28 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright (c) ArianeSoft Inc.
Copyright © 2009 www.ppl-lang.com - All rights reserved
Web Design by BR Web Consulting Ltd