[Mono-list] Simple Window Form can not be showed in Solaris

2005-07-28 Thread Huaiyang Mao
Hello,

I have installed mono 1.1.8.2 in Solaris and can compile the following
code with mcs -r:System.Windows.Forms Test.cs successfully. I tried
to start it mono Test.exe, but I could not get the simple Windows
Form showed. Could you help me to solve the problem? Many thanks.

--
using System;
using System.Collections;
using System.ComponentModel;

namespace client
{
  public class SimpleForm
  {
private System.ComponentModel.Container components = null;

[STAThread]
static void Main() 
{
  Application.Run(new SimpleForm());
}

public SimpleForm()
{
}
  }
}
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Simple Window Form can not be showed in Solaris

2005-07-28 Thread Elliott Draper

Huaiyang Mao wrote:


Hello,

I have installed mono 1.1.8.2 in Solaris and can compile the following
code with mcs -r:System.Windows.Forms Test.cs successfully. I tried
to start it mono Test.exe, but I could not get the simple Windows
Form showed. Could you help me to solve the problem? Many thanks.

--
using System;
using System.Collections;
using System.ComponentModel;

namespace client
{
 public class SimpleForm
 {
   private System.ComponentModel.Container components = null;

   [STAThread]
   static void Main() 
   {

 Application.Run(new SimpleForm());
   }

   public SimpleForm()
   {
   }
 }
}
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

 

Your almost there, you just need to make your SimpleForm class inherit 
from a Windows form, by adding using System.Windows.Forms; to the 
using declarations at the top, and then change the line

public class SimpleForm
to read:
public class SimpleForm: Form

This now means that your simple form class is derived from a Form, and 
when the app is run, it will create and display your basic blank form.


Hope that helps,

Regards,
-= El =-
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list