I don't like it if people just take the answers and don't tell anybody
if it worked or not - so here is what I did.
I guess I followed the clean solution suggested by Nicholas. I had
only to cover two methods for closing the dialog and for passing
messages to it, so it was not too much nasty work

The only thing I discovered with working with the dialog is that if
you are too fast in invoking functions on it, an exception is raised
because the dialog is not fully created yet, if at all. So as an
addition I passed an event flag to it, that is signaled if the dialog
is ready. I wait for that event on starting the tread (maybe I will
add a timeout here, because I don't want the application to stall just
because a little status box isn't opening).
So here is in a short version what I did:
----------------------------------------------------------------------------
using System;
using System.Windows.Forms;
using System.Threading;
namespace MyApplication
{
// declaration of delegates
public delegate void SetStatusMessageDelegate(string message);
public delegate void CloseDialogDelegate();
///////////////////////////////////
/// the status dialog
public class StatusDialog : System.Windows.Forms.Form
{
private System.ComponentModel.Container components = null;
private TextBox m_InfoText;
public SetStatusMessageDelegate m_SetStatusMessage;
public CloseDialogDelegate m_CloseDialog;
private System.Threading.ManualResetEvent m_Ready;
public StatusDialog(System.Threading.ManualResetEvent
dialogCreated)
{
this.m_SetStatusMessage = new
SetStatusMessageDelegate(SetStatusMessage);
this.m_CloseDialog = new CloseDialogDelegate(CloseDialog);
this.m_Ready = dialogCreated;
...
...
}
// signal that methods of the dialog can now be invoked
protected override void OnActivated(EventArgs e)
{
this.m_Ready.Set();
base.OnActivated (e);
}
private void SetStatusMessage(string message)
{
this.InfoText = message;
}
private void CloseDialog()
{
this.Close();
}
....
....
}
///////////////////////////////////
/// main app
public class MyForm : System.Windows.Forms.Form
{
private ManualResetEvent m_StatusDialogCreated;
private StatusDialog m_StatusDialog;
private System.Threading.Thread m_StatusDialogThread;
...
...
private void StatusDialogThread()
{
Application.Run(this.m_StatusDialog = new
StatusDialog(this.m_StatusDialogCreated));
}
public void OpenStatusDialog()
{
this.m_StatusDialogCreated = new ManualResetEvent(false);
this.m_StatusDialogThread = new Thread(new
ThreadStart(StatusDialogThread));
this.m_StatusDialogThread.Start();
// wait for the dialog to be ready
WaitHandle.WaitAll(new ManualResetEvent[]
{this.m_StatusDialogCreated});
}
public void SetStatusDialogMessage(string message)
{
if (this.m_StatusDialog!= null)
this.m_StatusDialog.BeginInvoke(this.m_StatusDialog.m_SetStatusMessage,
new Object[]{message});
}
public void CloseStatusDialog()
{
if (this.m_StatusDialog!= null)
this.m_StatusDialog.BeginInvoke(this.m_StatusDialog.m_CloseDialog,
null)
else // failsafe, dont want some half dead threads hanging
around - will work on this

if (this.m_StatusDialogThread.ThreadState !=
ThreadState.Stopped) this.m_StatusDialogThread.Abort();
// activate this window
this.Activate();
}
...
}
}
----------------------------------------------------------------------------
That works for me...
Thanks for pointing me in the right direction,
Alexander