[Mono-winforms-list] Re: Problems with Button........

Peter Dennis Bartok peter@novonyx.com
Sun, 28 Nov 2004 20:02:49 -0700


Seems you are running the 'discontinued' wine-based system.windows.forms 
assembly.
Check out http://www.mono-project.com/contributing/winforms.html  to see the 
details and how to build the newer implementation. The new implementation 
will become the default in the near future, but since we are still missing a 
few controls it is not yet.

Cheers,
  Peter

-----Original Message-----
From: "mandrake" <ievazquez2002@yahoo.com.mx>
To: <mono-winforms-list@lists.ximian.com>
Date: Sunday, 28 November, 2004 19:38
Subject: [Mono-winforms-list] Re: Problems with Button........


>Hi everybody,
>
>I just started playing with System.Windows.Forms on Windows.....and I got 
>the error when  I set Button's Text property. It works with .net 1.1
>
>This is my code..
>
>using System.Windows.Forms;
>using System;
>public class Form1:Form
>{
>    Button b;
>    public Form1()
>    {
>        b = new Button();
>        b.Text = "Accept";
>        b.Click += new EventHandler(b_Click);
>        this.Controls.Add(b);
>    }
>    private void b_Click(object sender,EventArgs e)
>    {
>        System.Console.WriteLine("clicked");
>    }
>    static void Main()
>    {
>          Application.Run(new Form1());
>    }
>}
>
>with mono 1.0.4 I got
>
>C:\usuarios\Development\mono>mono window2.exe
>Unhandled Exception: System.ArgumentException: Invalid Parameter. A null 
>referen
>ce or invalid value was found.
>in <0x00073> System.Drawing.GDIPlus:CheckStatus (System.Drawing.Status)
>in <0x00182> System.Drawing.Font:FromHfont (intptr)
>in <0x00015> System.Windows.Forms.Control:get_DefaultFont ()
>in <0x001af> System.Windows.Forms.Control:.ctor ()
>in <0x00010> System.Windows.Forms.ScrollableControl:.ctor ()
>in <0x00012> System.Windows.Forms.ContainerControl:.ctor ()
>in <0x00016> System.Windows.Forms.Form:.ctor ()
>in <0x0000f> Form1:.ctor ()
>in <0x0004c> (wrapper remoting-invoke-with-check) Form1:.ctor ()
>in <0x0001b> Form1:Main ()
>
>with mono 1.1.2
>Invalid Parameter. A null reference or invalid value
>
>Thanks in advance
>
>
>
>---------------------------------
>Do You Yahoo!?
>Yahoo! Net: La mejor conexión a internet y 2GB en tu buzón de Correo Yahoo! 
>por $100 al mes.
>