Thread View: pl.comp.lang.vbasic
6 messages
6 total messages
Started by Jacek
Fri, 10 Dec 2010 08:36
VB.NET 2010 - pasek postepu.
Author: Jacek
Date: Fri, 10 Dec 2010 08:36
Date: Fri, 10 Dec 2010 08:36
24 lines
1550 bytes
1550 bytes
Witajcie.
Mam funkcje a w niej:
For Each fName As String In Directory.GetFiles(sourcePath)
If File.Exists(fName) Then
Dim dFile As String = String.Empty
dFile = Path.GetFileName(fName)
Dim dFilePath As String = String.Empty
dFilePath = DestinationPath + dFile
File.Copy(fName, dFilePath, True)
ProgressBar1.Value = y
ProgressBar1.Refresh()
y = y + x
End If
Next
Sprawa polega na tym, ze nie odswieza sie pasek postepu.
Robilem juz rozne cuda i nic.
Samo powyzsze kopiowanie trwa okolo 5 min, wiec przydal by sie dzialajacy
progressbar, prawda?
Jak to ugryzc?
Pozdrawiam.
Re: VB.NET 2010 - pasek postepu.
Author: InDesign Scripts
Date: Fri, 10 Dec 2010 08:59
Date: Fri, 10 Dec 2010 08:59
23 lines
1828 bytes
1828 bytes
> For Each fName As String In Directory.GetFiles(sourcePath) > If File.Exists(fName) Then > Dim dFile As String = String.Empty > dFile = Path.GetFileName(fName) > Dim dFilePath As String = String.Empty > dFilePath = DestinationPath + dFile > File.Copy(fName, dFilePath, True) > ProgressBar1.Value = y > ProgressBar1.Refresh() > y = y + x > End If > Next > > Sprawa polega na tym, ze nie odswieza sie pasek postepu. > Robilem juz rozne cuda i nic. > Samo powyzsze kopiowanie trwa okolo 5 min, wiec przydal by sie dzialajacy > progressbar, prawda? > Jak to ugryzc? a gdzie ustawiasz NOWĄ wartość "x"? bo "x" to chyba ilość aktualnie skopiowanych danych/plików/etc.? robin
Re: VB.NET 2010 - pasek postepu.
Author: Wiktor Zychla
Date: Fri, 10 Dec 2010 09:00
Date: Fri, 10 Dec 2010 09:00
31 lines
1985 bytes
1985 bytes
Użytkownik "Jacek" <ala@ola.pl> napisał w wiadomości grup dyskusyjnych:1wp0hao771gwp.mm72xd3qfyvt$.dlg@40tude.net... > Witajcie. > > Mam funkcje a w niej: > > For Each fName As String In Directory.GetFiles(sourcePath) > If File.Exists(fName) Then > Dim dFile As String = String.Empty > dFile = Path.GetFileName(fName) > Dim dFilePath As String = String.Empty > dFilePath = DestinationPath + dFile > File.Copy(fName, dFilePath, True) > ProgressBar1.Value = y > ProgressBar1.Refresh() Application.DoEvents > y = y + x > End If > Next > > Sprawa polega na tym, ze nie odswieza sie pasek postepu. > Robilem juz rozne cuda i nic. > Samo powyzsze kopiowanie trwa okolo 5 min, wiec przydal by sie dzialajacy > progressbar, prawda? > Jak to ugryzc?
Re: VB.NET 2010 - pasek postepu.
Author: Jacek
Date: Fri, 10 Dec 2010 10:48
Date: Fri, 10 Dec 2010 10:48
29 lines
1960 bytes
1960 bytes
Dnia Fri, 10 Dec 2010 08:59:36 +0000, InDesign Scripts napisał(a): >> For Each fName As String In Directory.GetFiles(sourcePath) >> If File.Exists(fName) Then >> Dim dFile As String = String.Empty >> dFile = Path.GetFileName(fName) >> Dim dFilePath As String = String.Empty >> dFilePath = DestinationPath + dFile >> File.Copy(fName, dFilePath, True) >> ProgressBar1.Value = y >> ProgressBar1.Refresh() >> y = y + x >> End If >> Next >> >> Sprawa polega na tym, ze nie odswieza sie pasek postepu. >> Robilem juz rozne cuda i nic. >> Samo powyzsze kopiowanie trwa okolo 5 min, wiec przydal by sie dzialajacy >> progressbar, prawda? >> Jak to ugryzc? > > a gdzie ustawiasz NOWĄ wartość "x"? > bo "x" to chyba ilość aktualnie skopiowanych danych/plików/etc.? > > robin X obliczam wczesniej dzielac 100 przez ilosc plikow (pliki sa podobej wielkosci). Daje nam to srednia 1 pliku.
Re: VB.NET 2010 - pasek postepu.
Author: Jacek
Date: Fri, 10 Dec 2010 11:09
Date: Fri, 10 Dec 2010 11:09
35 lines
2092 bytes
2092 bytes
Dnia Fri, 10 Dec 2010 10:00:11 +0100, Wiktor Zychla napisał(a): > Użytkownik "Jacek" <ala@ola.pl> napisał w wiadomości grup > dyskusyjnych:1wp0hao771gwp.mm72xd3qfyvt$.dlg@40tude.net... >> Witajcie. >> >> Mam funkcje a w niej: >> >> For Each fName As String In Directory.GetFiles(sourcePath) >> If File.Exists(fName) Then >> Dim dFile As String = String.Empty >> dFile = Path.GetFileName(fName) >> Dim dFilePath As String = String.Empty >> dFilePath = DestinationPath + dFile >> File.Copy(fName, dFilePath, True) >> ProgressBar1.Value = y >> ProgressBar1.Refresh() > > Application.DoEvents > >> y = y + x >> End If >> Next >> >> Sprawa polega na tym, ze nie odswieza sie pasek postepu. >> Robilem juz rozne cuda i nic. >> Samo powyzsze kopiowanie trwa okolo 5 min, wiec przydal by sie dzialajacy >> progressbar, prawda? >> Jak to ugryzc? > Nie pomoglo. Sprawa jest tego typu, ze u mnie na win7/64 dziala prawidlowo, a na xp u klienta nie dziala... Dopiero jak skonczy kopiowac, to pasek sie zapelnia.
Re: VB.NET 2010 - pasek postepu.
Author: JJJK
Date: Mon, 13 Dec 2010 07:57
Date: Mon, 13 Dec 2010 07:57
8 lines
1318 bytes
1318 bytes
Jacek <ala@ola.pl> napisał(a): > Dnia Fri, 10 Dec 2010 10:00:11 +0100, Wiktor Zychla napisał(a): >> Użytkownik "Jacek" <ala@ola.pl> napisał w wiadomości grup >> dyskusyjnych:1wp0hao771gwp.mm72xd3qfyvt$.dlg@40tude.net... >>> ProgressBar1.Refresh() A może odświerzyć cała formę? Janusz
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads