Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » knowing download speed and ProgressIndicator
Re: knowing download speed and ProgressIndicator [message #17183 is a reply to message #17181] Fri, 01 August 2008 15:25 Go to previous messageGo to previous message
TeCNoYoTTa is currently offline  TeCNoYoTTa
Messages: 138
Registered: July 2008
Location: Egypt
Experienced Member

thanks luzr ...... i am sorry as i have a lot of questions

but now the program works but does no thing

i did this

bool Download_Manager_Window::progress_indecator ( int x, int all )
{
	static int timer = 0;
	static int data = 0;
	progress_bar.Set ( x, all );
	timer = clock() - timer;
	data = x - data;
	label_DownloadSpeed.SetText ( DblStr ( ( data / timer ) * 1.0 ) + " KB/S" );

	timer = clock();
	data = x;
	if (x == all)
		return true;
	else
		return false;
}

void Download_Manager_Window::Download_File ( String link )
{
	client.URL ( link );
	String file = client.ExecuteRedirect ( HttpClient::DEFAULT_MAX_REDIRECT, HttpClient::DEFAULT_RETRIES, THISBACK ( progress_indecator ) );

}



and opened it in a thread like this

(new Thread)->Run ( THISBACK1 ( Download_File, "http://cisclub.com/tecno/bta3/vector.rar" ) );


but no thing happen :S :S ...... the window opens and just do nothing

and this is the constructer of the windows which download

Download_Manager_Window::Download_Manager_Window()
{
	CtrlLayout ( *this, "Download" );
	label_DownloadDirectory.SetReadOnly();
	(new Thread)->Run ( THISBACK1 ( Download_File, "http://cisclub.com/tecno/bta3/vector.rar" ) );
}




thanks in advance and i am waiting your response

and sorry for my continuous asking
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: making thread
Next Topic: sending post message
Goto Forum:
  


Current Time: Tue May 14 22:30:53 CEST 2024

Total time taken to generate the page: 0.03232 seconds