|
|||||||
| Windows Mobile 2003 Questions and Answers regarding Windows Mobile 2003. |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) | |||
|
Aximsite Prospect
|
hi ,
i am working in WM2003 . in that i am not finding any option to stop the thread . in my case , the issue is as follows: 1. i am showing some animation in main thread . 2. i am fetching the information from network in another thread . 3. at the same time i am having a softkey ,when i press that softkey the network fetching should be stopped and return to the main menu. but its not happening so . my code is as follows : public delegate byte[] httpRequest(); public event httpRequest ht ; puzzlefetching = new Thread(new ThreadStart(docancel)); puzzlefetching.Start(); public void docancel() { httpRequest ht = null; ht += new httpRequest(dorequestHttp); byte[] data = null; try { data = (byte[])this.Invoke(ht); } catch (WebException w) { } } public byte[] dorequestHttp() { String url = uRl; byte[] dat = null; Uri uri = new Uri(url); request = (HttpWebRequest)WebRequest.Create(uri); request.Method = "GET"; response = (HttpWebResponse)request.GetResponse(); Stream dataStream = response.GetResponseStream(); StreamReader reader = new StreamReader(dataStream); int length = (int)response.ContentLength; dat = new byte[length]; dataStream.Read(dat, 0, length); reader.Close(); dataStream.Close(); response.Close(); } but the above code is showing arguement exception during runtime At the same time i am running a animation in main thread using forms timer | |||
|
|
|
| sponsor links |
![]() |
| Tags |
| thisinvoke, wm2003 |
| sponsor links |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mortscript help needed - invoke apps at scheduled time daily | zhaoyun | Water Fountain | 1 | 08-11-06 09:45 AM |
| update from WM2003 US to WM2003 french | tscda34 | X5 Forums | 0 | 11-08-05 01:52 AM |
| Invoke Start Menu From A Program Launcher | CurtisMinBC | Windows Mobile 2003 | 6 | 11-06-05 01:42 PM |
| WM2003 alarm bug fixed in WM2003 SE? | krypticide | Windows Mobile 2003 | 1 | 04-26-05 10:18 PM |
| Wm2003 | aggiecreeddude | PDA/AXIM Newbies | 1 | 07-27-03 01:43 AM |