KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

TaskProgressDialog() - A multiple task progress dialog

 
Post new topic   Reply to topic    KiXforms Forum Index -> Script Archive
View previous topic :: View next topic  
Author Message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Wed Mar 19, 2003 5:20 am    Post subject: TaskProgressDialog() - A multiple task progress dialog Reply with quote

This idea for a ListView based, taskcentric progress dialog isn't mine but i thought the concept would translate pretty well into kixforms. You can be the judge of that though. Heres a screenshot:

Download Source Code - 4KB




The original TaskProgressDialog() was developed in C++ so its mostly the concept that was borrowed here more so than the actual code - but heres the Authors original comments:

Quote:

Many of you have seen a kind of dialog showing multiple task installations for applications like Netscape and Explorer. A multi-task dialog can be summarized as a task area and a progress bar embedded in the dialog. The task area is a list of text strings showing multiple tasks to be performed. The progress bar indicates the percentage of task completed. It is quite common that image icons are associated with each text string to indicate the processing state of the task (See figure above). It is also common that many applications involve a series of lengthy operations which can be visually represented by the task dialog, e.g., Adobe Illustrator (AI) reads different files (binary AI native file and embedded image files) when opening .AI documents.


HOW TO USE

Firstly, an ARRAY is declared containing three bits of information for each "task" to perform:

1) The description of the task

2) A "callback" function that you provide, that gets called by the dialogbox when that task is to be performed.

3) A percent complete value (out of 100%) that indicates how far along the entire script is after that particular task is finished.

Heres an example of that:

Code:

;////////////////////////////////////////////////////////////////
; Your tasklist is defined here. The format of the array is:
; $TaskList[n] = "Description","CallBackFunction",PercentOfTotal
; Note!: Dont forget to change the dimensions of the array when
; when adding or subtracting tasks from the list...
;////////////////////////////////////////////////////////////////
 
Dim $TaskList[9]
$TaskList[0] = "Task1: Checking installed components on your computer","FunctionOne()",10
$TaskList[1] = "Task2: Installing necessary components","FunctionTwo()",10


Then you call the TaskProgressDialog() UDF as follows:

Code:

$= TaskProgressDialog($TaskList,"Install",,400)


You provide the array of tasks ($TaskList), the dialog caption ("Install") and the optional width and height of the dialog. After that, you code your callback functions, that get executed in sequence.

Anyway - more a proof of concept then anything else. Feedback always welcome.

-Shawn[/list][url][/url][url][/url][url][/url][url][/url]


Last edited by Shawn on Wed Mar 10, 2004 4:01 am; edited 2 times in total
Back to top
View user's profile Send private message
surveyor
KiXforms Dabbler
KiXforms Dabbler


Joined: 05 Mar 2003
Posts: 10
Location: Hamburg, Germany

PostPosted: Wed Mar 19, 2003 8:36 pm    Post subject: Reply with quote

I love it! When I will have undestood the script I will use it for our logonscript.
_________________
Mit freundlichen Grüßen

Jens Kalski
Back to top
View user's profile Send private message
Lonkero
KiXforms Devotee
KiXforms Devotee


Joined: 13 Mar 2003
Posts: 1022
Location: Espoo, Finland

PostPosted: Wed Mar 19, 2003 9:24 pm    Post subject: Reply with quote

I think it looks better with:
$ListView.BackColor = $Frame.BackColor
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Wed Mar 19, 2003 10:38 pm    Post subject: Reply with quote

Yap,

that would 'hide' the Grid and would look more like the 'Installation Routine' form ... matter of taste though Wink

_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.
Back to top
View user's profile Send private message MSN Messenger
rvgogh
KiXforms Dabbler
KiXforms Dabbler


Joined: 22 Jun 2004
Posts: 10
Location: The Netherlands, Utrecht

PostPosted: Tue Jun 22, 2004 11:37 am    Post subject: Reply with quote

What I see here is exactly the same I currently have with my login script.

while performing the tasks you cannot click cancel however, $=Execute($Form.DoEvents(1)) IS set to 1 which lets you click cancel as soon as a task is finished.. Any1 has a better solution for this ?

DoEvents(1) makes the script not wait for input on the form, but it doesnt work the other way....?!

THnx.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Script Archive All times are GMT
Page 1 of 1

 
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group