Article View: free.it.visual-basic
Article #2689[?]Ultimo problema con listbox (forse :-)
From: --Devaraja--
Date: Tue, 18 Feb 2003 19:26
Date: Tue, 18 Feb 2003 19:26
32 lines
2262 bytes
2262 bytes
Sempre riguardo al mio programma per ascoltare mp3..
C'� una listbox che contiene i titoli e un bottone "Salva playlist" che
salva su file l'elenco con questo codice:
Private Sub salva_Click()
With cdialog 'Apri cdialog per salvare
.Filter = "File playlist | *.pli"
.Flags = cdlOFNPathMustExist Or cdlOFNExplorer
.FileName = "Playlist"
.ShowSave
End With
nomesv = cdialog.FileName
Open nomesv For Append As #1
posiz = elenco.ListIndex
elenco.ListIndex = -1
Print #1, "Un po di avvertenze per chi edita il file"
Print #1, Str(elenco.ListCount) 'Numero titoli
For X = 0 To elenco.ListCount - 1
elenco.ListIndex = elenco.ListIndex + 1
Print #1, elenco.Text
Next
Close #1
elenco.ListIndex = posiz
End Sub
Funziona tutto perfettamente, per� il computer rimane bloccato fino a che
non ha finito di scorrere tutte le voci dell'elenco, che possono essere da 1
a 10000. Questo � un problema quando le canzoni in elenco sono tante perch�
non tutti hanno un 2 ghz con 512 mb di ram (neanke io :-)
come posso fare a creare una funzione di salvataggio pi� veloce?
Ciao, Devaraja
Technical Details
Message-ID:
<INv4a.266044$AA2.10267779@news2.tin.it>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.infostrada.it!newsfeeder.edisontel.com!news-out.tin.it!news-in.tin.it!news2.tin.it.POSTED!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ITALIAN,ASCII X-Google-Thread: f94ee,fc2764a0eb4edf05,start X-Google-Attributes: gidf94ee,public X-Google-ArrivalTime: 2003-02-18 11:26:34 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.infostrada.it!newsfeeder.edisontel.com!news-out.tin.it!news-in.tin.it!news2.tin.it.POSTED!not-for-mail From: "--Devaraja--" <leonzio@libero.it> Newsgroups: free.it.visual-basic Subject: [?]Ultimo problema con listbox (forse :-) Lines: 34 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: <INv4a.266044$AA2.10267779@news2.tin.it> Date: Tue, 18 Feb 2003 19:26:32 GMT NNTP-Posting-Host: 80.116.56.29 X-Complaints-To: newsmaster@tin.it X-Trace: news2.tin.it 1045596392 80.116.56.29 (Tue, 18 Feb 2003 20:26:32 MET) NNTP-Posting-Date: Tue, 18 Feb 2003 20:26:32 MET Organization: TIN