Actualisation filelistbox

Actualisation filelistbox - VB/VBA/VBS - Programmation

Marsh Posté le 03-05-2004 à 10:44:11    

Bonjour,
 
J'aimerai tout simplement savoir comment actualiser une filelistbox sous VB6. J'aimerai une actualisation permanente jusqu'à ce que je clique sur un bouton.
 
Merci d'avance


Message édité par waterbro le 03-05-2004 à 10:45:28
Reply

Marsh Posté le 03-05-2004 à 10:44:11   

Reply

Marsh Posté le 03-05-2004 à 11:41:44    

à mon avis, tu vas devoir passer par un timer, je n'ai pas l'impression que ces contrôles se rafraichissent automatiquement :/


---------------
Whichever format the fan may want to listen is fine with us – vinyl, wax cylinders, shellac, 8-track, iPod, cloud storage, cranial implants – just as long as it’s loud and rockin' (Billy Gibbons, ZZ Top)
Reply

Marsh Posté le 03-05-2004 à 11:44:19    

Non, effectivement. J'ai essayé avec un timer mais ca ne marche pas ...
Vu que ça a commencé à me gaver, j'ai fini par rajouter un bouton d'actualisation.
Mais merci quand même.  :)

Reply

Marsh Posté le 03-05-2004 à 11:48:42    

sur le timer, tu fais un refresh du contrôle [:spamafote]
 
j'ai testé, ça marche [:heink] (le problème étant que tu perds ta sélection).


---------------
Whichever format the fan may want to listen is fine with us – vinyl, wax cylinders, shellac, 8-track, iPod, cloud storage, cranial implants – just as long as it’s loud and rockin' (Billy Gibbons, ZZ Top)
Reply

Marsh Posté le 03-05-2004 à 11:51:32    

Peux tu me donner le code t'ayant permis de réaliser ton Timer ... STP

Reply

Marsh Posté le 03-05-2004 à 14:05:59    

j'ai créé un projet basique et j'ai glissé dessus un timer (interval = 1000) et un FileListBox. Voici le code que j'ai ajouté:
 

Code :
  1. Option Explicit
  2. Private Sub Form_Load()
  3.     File1.Path = "c:\"
  4. End Sub
  5. Private Sub Timer1_Timer()
  6.     File1.Refresh
  7. End Sub


 
je crée un fichier sur c:\, et il apparaît dans la liste, dans la seconde (délai que j'ai fixé sur le timer).


---------------
Whichever format the fan may want to listen is fine with us – vinyl, wax cylinders, shellac, 8-track, iPod, cloud storage, cranial implants – just as long as it’s loud and rockin' (Billy Gibbons, ZZ Top)
Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed