Do not initialize visuals
I want to use my software for windows service , so I need to run my software , it takes about 4-5 seconds to draw visual item like buttons or listbox , I do not need visual , because users do not see my software , is there any way to not开发者_运维知识库 initialize visual Items ?
If you don't need a UI, why are you writing a WinForms app? Why not just have a console app which does the job without creating a UI? If you also need a WinForms version, I suggest you put the common functionality in a class library which both the console app and the WinForms app use.
精彩评论