Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object Question
Message
De
11/12/2019 19:01:32
 
 
À
11/12/2019 16:34:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01672226
Message ID:
01672230
Vues:
49
Thanks. Will give it a swirl.

>I am running this code to start a progress bar before my scan-insert process. I have to run it in two places for two seperate types of files. They could run at the same time and they could not. so would like to check to see if the object has already been created
>
>oProgBar = CREATEOBJECT('ProgBar')
>oProgBar.SetTitle('SPORTMA')
>oProgBar.SetMessage('Importing ' + STR(oVar.TempCount)+ ' Processing the main records from the data file....')
>oProgBar.SetRange(0, oVar.TempCount - 1)
>oProgBar.Show()
>
>once process number 1 is complete, then i want to start on process number two but if the progress bar is already created, then I want to just change the verbaige in the SetMessage line as well as teh set range (b/c record count could be different) and obvisouly the show:
>
>oProgBar.SetTitle('SPORTMA')
>oProgBar.SetMessage('Importing ' + STR(oVar.TempCount)+ ' Processing records from subordinate data file....')
>oProgBar.SetRange(0, oVar.TempCount - 1)
>oProgBar.Show()

Try the following
IF VARTYPE(oProgBar) != "O"
    oProgBar = CREATEOBJECT('ProgBar')
    oProgBar.SetTitle('SPORTMA')
ENDIF
oProgBar.SetMessage('Importing ' + STR(oVar.TempCount)+ ' Processing records from subordinate data file....')
oProgBar.SetRange(0, oVar.TempCount - 1)
oProgBar.Show()
Thanks in Advance.

J. Turner
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform