I want to call Winform method from Windows Service.
For Example, Here is my Winform application code (MyWinForm),
public void TestMethod(){
MessageBox.Show("Hello World!");
}
And here is my Windows Service (MyService),
protected override void OnStart(string[] args){
MyWinform myWinform = new MyWinform();
myWinform.TestMethod();
}
Please let me know if there is any other way to do this. Thank you.