[Mono-osx] Winforms Problems
Godlie at gmx.at
Godlie at gmx.at
Tue Nov 8 06:32:08 EST 2005
hi
im trying to get my simple programm ( Mainform, button, label ) to work, but
if i try to compile it with:
mcs MainForm.cs
i get some errors:
MainForm.cs(19,26): error CS0234: The type or namespace name `Windows' does
not exist in the namespace `System'. Are you missing an assembly reference?
error CS0234: No such name or typespace System.Windows
error CS0234: No such name or typespace System.Windows.Forms
Compilation failed: 3 error(s), 0 warnings
so i decided to search for an solution, but i haven't found something yet.
im using MAc os 10.4 with momo 1.1.9.1.
hope you can help me.
greets godlie
at last my programm:
/*
* Created by SharpDevelop.
* User: godlie
* Date: 06.11.2005
* Time: 16:37
*
* To change this template use Tools | Options | Coding | Edit Standard
Headers.
*/
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
namespace formsTest
{
/// <summary>
/// Description of MainForm.
/// </summary>
public class MainForm : System.Windows.Forms.Form
{
public MainForm()
{
//
// The InitializeComponent() call is required for Windows Forms designer
support.
//
InitializeComponent();
//
// TODO: Add constructor code after the InitializeComponent() call.
//
}
[STAThread]
public static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.Run(new MainForm());
}
#region Windows Forms Designer generated code
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The
Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent()
{
button1 = new System.Windows.Forms.Button();
label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(292, 266);
//
// button1
//
button1.Location = new System.Drawing.Point(119, 149);
button1.Name = "button1";
button1.Size = new System.Drawing.Size(75, 23);
button1.TabIndex = 1;
button1.Text = "button1";
button1.UseCompatibleTextRendering = true;
button1.UseVisualStyleBackColor = true;
button1.Click += new System.EventHandler(this.Button1Click);
//
// label1
//
label1.Location = new System.Drawing.Point(80, 62);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(100, 23);
label1.TabIndex = 0;
label1.Text = "label1";
label1.UseCompatibleTextRendering = true;
this.Controls.Add(button1);
this.Controls.Add(label1);
this.Name = "MainForm";
this.Text = "MainForm";
this.ResumeLayout(false);
}
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
#endregion
void Button1Click(object sender, System.EventArgs e)
{
label1.Text = "fghjkl";
}
}
}
More information about the Mono-osx
mailing list