[Mono-winforms-list] Problem with MWF

Paul paul at all-the-johnsons.co.uk
Fri Jul 1 18:07:30 EDT 2005


Hi,

> Having the code that causes this would surely help. Or at least some details 
> what the code puts in / what keys you pressed in the textbox.

The source is below. It doesn't run, just gives the throwback I
originally posted. I have a few other examples of this behaviour in code
which previously ran.

> using System;
> using System.Drawing;
> using System.ComponentModel;
> using System.Windows.Forms;
> using System.Data;
> 
> namespace WindowsApplication1
> {
>   public class Form1:System.Windows.Forms.Form
>   {
>     private System.Windows.Forms.GroupBox groupBox1;
>     private System.Windows.Forms.RadioButton radioButton1;
>     private System.Windows.Forms.RadioButton radioButton2;
>     private System.Windows.Forms.RadioButton radioButton3;
>     private System.Windows.Forms.CheckBox checkBox1;
>     private System.Windows.Forms.CheckBox checkBox2;
>     private System.Windows.Forms.CheckBox checkBox3;
>     private System.Windows.Forms.Button button1;
>     private System.Windows.Forms.Button button2;
>     private System.Windows.Forms.ProgressBar progressBar1;
>     private System.Windows.Forms.TabControl tabControl1;
>     private System.Windows.Forms.TabPage tabPage1;
>     private System.Windows.Forms.TabPage tabPage2;
>     private System.Windows.Forms.ListView listView1;
>     private System.Windows.Forms.DateTimePicker dateTimePicker1;
>     private System.Windows.Forms.TrackBar trackBar1;
>     private System.Windows.Forms.HScrollBar hScrollBar1;
>     private System.Windows.Forms.VScrollBar vScrollBar1;
>     private System.Windows.Forms.ColumnHeader columnHeader1;
>     private System.Windows.Forms.ColumnHeader columnHeader2;
>     private System.ComponentModel.Container components = null;
> 
>     public Form1()
>     {
>       InitialiseComponent();
>     }
> 
>     protected override void Dispose(bool disposing)
>     {
>       if (disposing)
>       {
> if (components != null)
> {
>   components.Dispose();
> }
>       }
>       base.Dispose(disposing);
>     }
> 
>     #region Windows Form Designer generated code
>     /// <summary>
>     /// Required method for Designer support - do not modify
>     /// the contents of this method with the code editor.
>     /// </summary>
> 
>     private void InitialiseComponent()
>     {
>       this.groupBox1 = new System.Windows.Forms.GroupBox();
>       this.button2 = new System.Windows.Forms.Button();
>       this.button1 = new System.Windows.Forms.Button();
>       this.checkBox3 = new System.Windows.Forms.CheckBox();
>       this.checkBox2 = new System.Windows.Forms.CheckBox();
>       this.checkBox1 = new System.Windows.Forms.CheckBox();
>       this.radioButton3 = new System.Windows.Forms.RadioButton();
>       this.radioButton2 = new System.Windows.Forms.RadioButton();
>       this.radioButton1 = new System.Windows.Forms.RadioButton();
>       this.tabControl1 = new System.Windows.Forms.TabControl();
>       this.progressBar1 = new System.Windows.Forms.ProgressBar();
>       this.tabPage1 = new System.Windows.Forms.TabPage();
>       this.listView1 = new System.Windows.Forms.ListView();
>       this.tabPage2 = new System.Windows.Forms.TabPage();
>       this.vScrollBar1 = new System.Windows.Forms.VScrollBar();
>       this.hScrollBar1 = new System.Windows.Forms.HScrollBar();
>       this.trackBar1 = new System.Windows.Forms.TrackBar();
>       this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
>       this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
>       this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
>       this.groupBox1.SuspendLayout();
>       this.tabControl1.SuspendLayout();
>       this.tabPage1.SuspendLayout();
>       this.tabPage2.SuspendLayout();
> 
> ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit();
>       this.SuspendLayout();
>       //
>       // groupBox1
>       //
>       this.groupBox1.Controls.AddRange(new
> System.Windows.Forms.Control[] {
> this.button2, this.button1, this.checkBox3, this.checkBox2,
> this.checkBox1, this.radioButton3, this.radioButton2,
> this.radioButton1});
>       this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.System;
>       this.groupBox1.Location = new System.Drawing.Point(8, 8);
>       this.groupBox1.Name = "groupBox1";
>       this.groupBox1.Size = new System.Drawing.Size(336, 104);
>       this.groupBox1.TabIndex = 0;
>       this.groupBox1.TabStop = false;
>       this.groupBox1.Text = "groupBox1";
>       //
>       // button2
>       //
>       this.button2.FlatStyle = System.Windows.Forms.FlatStyle.System;
>       this.button2.Location = new System.Drawing.Point(168, 72);
>       this.button2.Name = "button2";
>       this.button2.TabIndex = 7;
>       this.button2.Text = "button2";
>       //
>       // button 1
>       //
>       this.button1.FlatStyle = System.Windows.Forms.FlatStyle.System;
>       this.button1.Location = new System.Drawing.Point(248, 72);
>       this.button1.Name = "button1";
>       this.button1.TabIndex = 6;
>       this.button1.Text = "button1";
>       //
>       // checkbox3
>       //
>       this.checkBox3.FlatStyle = System.Windows.Forms.FlatStyle.System;
>       this.checkBox3.Location = new System.Drawing.Point(216, 40);
>       this.checkBox3.Name = "checkBox3";
>       this.checkBox3.TabIndex = 5;
>       this.checkBox3.Text = "checkBox3";
>       //
>       // checkbox2
>       //
>       this.checkBox2.FlatStyle = System.Windows.Forms.FlatStyle.System;
>       this.checkBox2.Location = new System.Drawing.Point(112, 40);
>       this.checkBox2.Name = "checkBox2";
>       this.checkBox2.TabIndex = 4;
>       this.checkBox2.Text = "checkBox2";
>       //
>       // checkbox1
>       //
>       this.checkBox1.FlatStyle = System.Windows.Forms.FlatStyle.System;
>       this.checkBox1.Location = new System.Drawing.Point(8, 40);
>       this.checkBox1.Name = "checkBox1";
>       this.checkBox1.TabIndex = 3;
>       this.checkBox1.Text = "checkBox1";
>       //
>       // radioButton3
>       //
>       this.radioButton3.FlatStyle =
> System.Windows.Forms.FlatStyle.System;
>       this.radioButton3.Location = new System.Drawing.Point(216, 16);
>       this.radioButton3.Name = "radioButton3";
>       this.radioButton3.TabIndex = 2;
>       this.radioButton3.Text = "radioButton3";
>       //
>       // radioButton2
>       //
>       this.radioButton2.FlatStyle =
> System.Windows.Forms.FlatStyle.System;
>       this.radioButton2.Location = new System.Drawing.Point(112, 16);
>       this.radioButton2.Name = "radioButton2";
>       this.radioButton2.TabIndex = 1;
>       this.radioButton2.Text = "radioButton2";
>       //
>       // radioButton1
>       //
>       this.radioButton1.FlatStyle =
> System.Windows.Forms.FlatStyle.System;
>       this.radioButton1.Location = new System.Drawing.Point(8, 16);
>       this.radioButton1.Name = "radioButton1";
>       this.radioButton1.TabIndex = 0;
>       this.radioButton1.Text = "radioButton1";
>       //
>       // progressBar1
>       //
>       this.progressBar1.Location = new System.Drawing.Point(8, 120);
>       this.progressBar1.Name = "progressBar1";
>       this.progressBar1.Size = new System.Drawing.Size(336, 23);
>       this.progressBar1.TabIndex = 1;
>       //
>       // tabControl1
>       //
>       this.tabControl1.Controls.AddRange(
> new System.Windows.Forms.Control[] {
>    this.tabPage1, this.tabPage2 });
>       this.tabControl1.Location = new System.Drawing.Point(8, 152);
>       this.tabControl1.Name = "tabControl1";
>       this.tabControl1.SelectedIndex = 0;
>       this.tabControl1.Size = new System.Drawing.Size(336, 184);
>       this.tabControl1.TabIndex = 2;
>       //
>       // tabPage1
>       //
>       this.tabPage1.Controls.AddRange(new System.Windows.Forms.Control[]
> {
> this.listView1});
>       this.tabPage1.Location = new System.Drawing.Point(4, 22);
>       this.tabPage1.Name = "tabPage1";
>       this.tabPage1.Size = new System.Drawing.Size(328, 158);
>       this.tabPage1.TabIndex = 0;
>       this.tabPage1.Text = "tabPage1";
>       //
>       // listView1
>       //
>       this.listView1.AutoArrange = false;
>       this.listView1.Columns.AddRange(
>       new System.Windows.Forms.ColumnHeader[] {
> this.columnHeader1,
> this.columnHeader2});
>       this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
>       this.listView1.Name = "listView1";
>       this.listView1.Size = new System.Drawing.Size(328, 158);
>       this.listView1.TabIndex = 0;
>       this.listView1.View = System.Windows.Forms.View.Details;
>       //
>       // tabPage2
>       //
>       this.tabPage2.Controls.AddRange(new System.Windows.Forms.Control[]
> {
> this.vScrollBar1, this.hScrollBar1, this.trackBar1,
>       this.dateTimePicker1});
> 
>       // the above should be this.trackBar1, this.dateTimePicker1 });
> 
>       this.tabPage2.Location = new System.Drawing.Point(4, 22);
>       this.tabPage2.Name = "tabPage2";
>       this.tabPage2.Size = new System.Drawing.Size(328, 158);
>       this.tabPage2.TabIndex = 1;
>       this.tabPage2.Text = "tabPage2";
>       //
>       // vScrollBar1
>       //
>       this.vScrollBar1.Location = new System.Drawing.Point(304, 8);
>       this.vScrollBar1.Name = "vScrollBar1";
>       this.vScrollBar1.Size = new System.Drawing.Size(17, 128);
>       this.vScrollBar1.TabIndex = 3;
>       //
>       // hScrollBar1
>       //
>       this.hScrollBar1.Location = new System.Drawing.Point(8, 136);
>       this.hScrollBar1.Name = "hScrollBar1";
>       this.hScrollBar1.Size = new System.Drawing.Size(296, 17);
>       this.hScrollBar1.TabIndex = 2;
>       //
>       // trackBar1
>       //
>       this.trackBar1.Location = new System.Drawing.Point(8, 40);
>       this.trackBar1.Name = "trackBar1";
>       this.trackBar1.Size = new System.Drawing.Size(288, 45);
>       this.trackBar1.TabIndex = 1;
>       //
>       // dateTimePicker1
>       //
>       this.dateTimePicker1.Location = new System.Drawing.Point(8, 8);
>       this.dateTimePicker1.Name = "dateTimePicker1";
>       this.dateTimePicker1.Size = new System.Drawing.Size(288, 20);
>       this.dateTimePicker1.TabIndex = 0;
>       //
>       // columnHeader1
>       //
>       this.columnHeader1.Text = "columnHeader1";
>       this.columnHeader1.Width = 100;
>       //
>       // columnHeader2
>       //
>       this.columnHeader2.Text = "columnHeader2";
>       this.columnHeader2.Width = 100;
>       //
>       // Form1
>       //
>       this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
>       this.ClientSize = new System.Drawing.Size(352, 342);
>       this.Controls.AddRange(new System.Windows.Forms.Control[] {
> this.tabControl1, this.progressBar1, this.groupBox1});
>       this.Name = "Form1";
>       this.Text = "Form1";
>       this.groupBox1.ResumeLayout(false);
>       this.tabControl1.ResumeLayout(false);
>       this.tabPage1.ResumeLayout(false);
>       this.tabPage2.ResumeLayout(false);
> 
> ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit();
>       this.ResumeLayout(false);
>     }
>     #endregion
> 
>     [STAThread]
>     static void Main()
>     {
>       Application.Run(new Form1());
>     }
>   }
> }


TTFN

Paul
-- 
"The city of Washington was built on a stagnant swamp some 200 years ago
and very little has changed; it stank then and it stinks now. Only
today, it is the fetid stench of corruption that hangs in the air" -
Simpson, L. Mr Lisa Goes to Washington (1991) Fox. 8F01 (Sep).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://galactus.ximian.com/pipermail/mono-winforms-list/attachments/20050701/6c714ad9/attachment-0001.bin


More information about the Mono-winforms-list mailing list