some knowledge about function
every time u running function its block ur program until it finish
that it go to next line in ur code ....
well there is other function from second type
its even exist from dos batch files [start "" /b ...]
that dont block ur program.
they work in background and ur program go to next line in code
and dont wait until function over
it can be done by using Thread class,
new thread(Go).Start(1);
or by homemade methood here some examples
'http://msdn.microsoft.com/en-us/library/system.net.webclient.downloadfileasync(v=vs.80).aspx'
this function will download your file in backgrownd
and program will move to next line in ur code
while file is downloaded <!>
'http://msdn.microsoft.com/en-us/library/system.net.webclient.downloadfile(v=vs.80).aspx'
but this function in diffrent, it will wait until u will download ur file
and later or by exeption ur program will move next code
and here more complex examples
'http://msdn.microsoft.com/en-us/library/system.windows.forms.control.begininvoke.aspx'
and there is more samples like that one
this will run somthing on main thread of ur control
but it will run in background and not block ur application
'http://msdn.microsoft.com/en-us/library/system.io.stream.beginread.aspx'
or like this one [with callback function]
this one will wait for incoming data and if u give it callBack function
when data avilible to read it will call ur callBack function [it actually pointer to the function]
and when the callback func is up, it run in diffrent thread and not block ur program
but no matter what happen your program will go to next line of the code
for some of this function u will have to use delegate
so in any case of made a delegate of some type
press f12 on the delegate function, see the defination
and make similier function with same return type & paramaeters
and use it as callback 🤗
every time u running function its block ur program until it finish
that it go to next line in ur code ....
well there is other function from second type
its even exist from dos batch files [start "" /b ...]
that dont block ur program.
they work in background and ur program go to next line in code
and dont wait until function over
it can be done by using Thread class,
new thread(Go).Start(1);
or by homemade methood here some examples
'http://msdn.microsoft.com/en-us/library/system.net.webclient.downloadfileasync(v=vs.80).aspx'
this function will download your file in backgrownd
and program will move to next line in ur code
while file is downloaded <!>
'http://msdn.microsoft.com/en-us/library/system.net.webclient.downloadfile(v=vs.80).aspx'
but this function in diffrent, it will wait until u will download ur file
and later or by exeption ur program will move next code
and here more complex examples
'http://msdn.microsoft.com/en-us/library/system.windows.forms.control.begininvoke.aspx'
and there is more samples like that one
this will run somthing on main thread of ur control
but it will run in background and not block ur application
'http://msdn.microsoft.com/en-us/library/system.io.stream.beginread.aspx'
or like this one [with callback function]
this one will wait for incoming data and if u give it callBack function
when data avilible to read it will call ur callBack function [it actually pointer to the function]
and when the callback func is up, it run in diffrent thread and not block ur program
but no matter what happen your program will go to next line of the code
for some of this function u will have to use delegate
so in any case of made a delegate of some type
press f12 on the delegate function, see the defination
and make similier function with same return type & paramaeters
and use it as callback 🤗

