Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modal Form
Message
From
10/11/2001 06:26:43
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
10/11/2001 05:24:05
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00580101
Message ID:
00580115
Views:
21
>I need to click a button on a form, check to see if a set of files exist, if they don't create them, when they are done let the button finish it's code. The creation process may take a minute or so. Would it be a wise idea to use a modal form to display some sort of progess. Then based on the out come let the calling form have the control back to finish the process. I haven't used modal forms in my app but this may be a case where it is needed.

Steven,
Yes I think it would be wise to provide progress in a modal form.
You could also divide your processes into sections as form methods. Also have and editbox to provide feedback to user. ie:If you checked FoxyClasses DataUpdater it uses this technique with an ActiveX progress bar :
*Modal form process controlling method
with thisform
 if .Process1() and ;
     .Process2() and ;
*...
     .ProcessN()
 messagebox('Blah blah completed succesfully.')
endwith

* A method updating the indexes
with thisform
 .pBar.Max   = reccount('NewIndexes')
 .pBar.Value = 0
 .SetStatus('Updating indexes...')
* Do update
* As each update in a loop finishes update bar
   .pBar.Value = min(.pBar.Value + 1, .pBar.Max)
* As each update in a loop finishes

* Process finished
  .SetStatus('Updating indexes...Done.')
endwith

* Setstatus - Feedbacks user via editbox
lparameters tcMessage
with thisform.pBarStatus && pBarStatus is the name of feedback editbox
 .Value = .Value + iif(empty(.Value),'',chr(13)+chr(10))+tcMessage
 .SelStart = len(.Value)
endwith
This form need not be modal but it can call any modal form to get intermediate user input. Making this modal might be good if you don't want the user to go to other forms while the process is ongoing.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform