Hey,
I have made a program, that simply runs as a tray icon in the
systemtray, providing a HTTP Server using HTTPListener.
I have one problem however, it idles at 70-100% cpu.
It could be 1 of 2 things:
1) In my Sub Main i have:
Sub Main()
While CloseProgram = False
Application.DoEvents()
End While
End Sub
I didn't quite know how to do it otherwise (Stop the program closing as
its just a tray icon and no windows forms are present), or its
2) The HTTPListener being greedy.
Any Ideas?
Cheers
Armin Zingler - 31 Jul 2007 02:40 GMT
> Hey,
>
[quoted text clipped - 19 lines]
>
> Any Ideas?
Replace your loop by
Application.Run
And instead of setting CloseProgram = True, call Application.ExitThread.
Armin
Tom - 31 Jul 2007 03:03 GMT
Thank you very much Armin, that information was very much appreciated :)
>> Hey,
>>
[quoted text clipped - 26 lines]
>
> Armin
Armin Zingler - 31 Jul 2007 11:27 GMT
> Thank you very much Armin, that information was very much appreciated :)
Was a pleasure :)
Armin