Information générale
Catégorie:
Codage, syntaxe et commandes
>Hello:
>
>I have a program written that uses the adir function to display
>all directory information into a form when the user clicks a button.
>
>If a user makes a change to a file and then displays the file details
>in this form it gives that date and time before the change. If they go into explorer and refresh and then use the program it gives the correct information. How can I incorporate a refresh in my program
>so that any changes to files in the directories which I am displaying
>will be immediately displayed in my form?
>
>Any input would be greatly appreciated. Thank you.
The functionality of the button click to display the directory info can be called using a timer. Drop a timer onto the form and set the interval to whatever(1000 = 1 sec). Then in the timer event of the timer control:
thisform.button.click()
This should refresh the information displayed by button evertime the timer event fires. You can also do the same thing without a timer by using an event on some other control or the form itself. Perhaps thisform.KeyPress() for example.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement