Re: Mono, Windows Forms, and Headless operation

Timotheus Pokorra <[email protected]>
Newsgroups gmane.comp.gnome.mono.general
Message-ID <CAJ0=nQfRK21WdoEQCKCUuP0mdJjCve8sPfAq6qWwCJ10qGZSGg@mail.gmail.com>
Hello George,

> Question First:
> The main question I had for the Mono list is this.  Is it possible to have
> mono run Windows Forms code without trying to open X11 (I.e. headless mode)?
> What triggers mono to request an X11 display? Is it the project type?  Is it
> the call to an object that inherits from a Windows Forms control?  I don’t
> need to see the form, but if I’m using BackgroundWorkers, I need the form's
> event handler, don’t I?

You should try to modify the project type, ie OutputType in the csproj
file, WinExe vs Exe.

> I know this may be confusing, and if so, please feel free to ask for
> clarifications, or even just to say “Why would you want to do that?”

I wonder if you could cleanly separate the business logic from the
gui. Then you can have a dll with the business logic, which you can
reference from your winforms forms, but also from your console
application.

hope this helps,
  Timotheus
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.