Click here to Skip to main content
15,890,557 members
Home / Discussions / C#
   

C#

 
QuestionTest Pin
Jisha Pappachan3-Mar-06 0:39
Jisha Pappachan3-Mar-06 0:39 
AnswerRe: Test Pin
Jijo BP3-Mar-06 0:41
Jijo BP3-Mar-06 0:41 
AnswerRe: Test Pin
Vasudevan Deepak Kumar3-Mar-06 2:21
Vasudevan Deepak Kumar3-Mar-06 2:21 
Questionsome problems with UI in WIndows Service Pin
Marcin-Dz2-Mar-06 23:28
Marcin-Dz2-Mar-06 23:28 
AnswerRe: some problems with UI in WIndows Service Pin
J4amieC3-Mar-06 0:17
J4amieC3-Mar-06 0:17 
GeneralRe: some problems with UI in WIndows Service Pin
Marcin-Dz3-Mar-06 0:55
Marcin-Dz3-Mar-06 0:55 
GeneralRe: some problems with UI in WIndows Service Pin
Marcin-Dz3-Mar-06 6:57
Marcin-Dz3-Mar-06 6:57 
GeneralRe: some problems with UI in WIndows Service Pin
Marcin-Dz3-Mar-06 11:10
Marcin-Dz3-Mar-06 11:10 
Maybe the reason why it isn't working is that Windows Service does not have classic Message Loop as Windows Applications have.

I currently solved my problem in, let's say - no professional way.

I created Window in a different thread:

public partial class Server : ServiceBase
{
MainForm window;
Thread thread;

public Server()
{
InitializeComponent();
}

protected override void OnStart(string[] args)
{
thread = new Thread(new ThreadStart(WindowFunction));
thread.Start();
}

protected override void OnStop()
{
}

private void WindowFunction()
{
Application.Run(window = new MainForm());
}
}


but is it really the best solution?
GeneralRe: some problems with UI in WIndows Service Pin
mav.northwind3-Mar-06 22:20
mav.northwind3-Mar-06 22:20 
Questionneed an example Pin
eyalso2-Mar-06 23:24
eyalso2-Mar-06 23:24 
AnswerRe: need an example Pin
Dario Solera3-Mar-06 2:10
Dario Solera3-Mar-06 2:10 
AnswerRe: need an example Pin
ZhengqiangLin5-Mar-06 0:10
ZhengqiangLin5-Mar-06 0:10 
QuestionSetting the Windows Desktop Wallpaper Pin
TerjeTT2-Mar-06 23:08
TerjeTT2-Mar-06 23:08 
AnswerRe: Setting the Windows Desktop Wallpaper Pin
Thomas Stockwell4-Mar-06 17:35
professionalThomas Stockwell4-Mar-06 17:35 
Questionset column of crystal report Pin
angelagke2-Mar-06 22:34
angelagke2-Mar-06 22:34 
QuestionProblem with German Date Format Pin
Sivagnanam2-Mar-06 22:26
Sivagnanam2-Mar-06 22:26 
AnswerRe: Problem with German Date Format Pin
mav.northwind3-Mar-06 3:18
mav.northwind3-Mar-06 3:18 
GeneralRe: Problem with German Date Format Pin
Guffa3-Mar-06 3:51
Guffa3-Mar-06 3:51 
GeneralRe: Problem with German Date Format Pin
Sivagnanam5-Mar-06 16:17
Sivagnanam5-Mar-06 16:17 
GeneralRe: Problem with German Date Format Pin
Guffa6-Mar-06 4:22
Guffa6-Mar-06 4:22 
QuestionHow to Convert System.Drawings.Bitmap to stdole.IPictureDisp Pin
fearless stallion2-Mar-06 22:19
fearless stallion2-Mar-06 22:19 
Questioncreating events of dynamically added dropdownlist control Pin
abhishek_garg2-Mar-06 19:15
abhishek_garg2-Mar-06 19:15 
AnswerRe: creating events of dynamically added dropdownlist control Pin
Vasudevan Deepak Kumar2-Mar-06 19:34
Vasudevan Deepak Kumar2-Mar-06 19:34 
Questionmerging two images in pictureboxesc# Pin
prgramya2-Mar-06 18:38
prgramya2-Mar-06 18:38 
AnswerRe: merging two images in pictureboxesc# Pin
Vasudevan Deepak Kumar2-Mar-06 20:00
Vasudevan Deepak Kumar2-Mar-06 20:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.