M
Maciej Kotok
Hi
Im trying to use the TextBoxEx Control in my Smart Device Application. Im
new with the OpenNETCF and I have some problems with the mouse events. I
have an object of textBoxEx class named textBox1 and I want to handle some
mouse event - let say Click. Here is my code:
using System;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.Data;
using OpenNETCF.Windows.Forms;
namespace temp
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private OpenNETCF.Windows.Forms.TextBoxEx textBox1;
private System.Windows.Forms.MainMenu mainMenu1;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// textBox1
//
this.textBox1 = new TextBoxEx();
this.textBox1.Location = new System.Drawing.Point(8, 8);
this.textBox1.Multiline = true;
this.textBox1.Size = new System.Drawing.Size(224, 108);
this.textBox1.Text = "textBox1";
this.Controls.Add(textBox1);
this.textBox1.Click +=new EventHandler(textBox1_Click);
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
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 InitializeComponent()
{
this.mainMenu1 = new System.Windows.Forms.MainMenu();
//
// Form1
//
this.Menu = this.mainMenu1;
this.MinimizeBox = false;
this.Text = "Form1";
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main()
{
ApplicationEx.Run(new Form1());
}
private void textBox1_Click(object sender, EventArgs e)
{
MessageBox.Show("Textbox1 Click");
}
}
}
There must me something wrong with it because it dosent work. The
textBox1_Click method dosen't activate. Is there anything else that i should
do to make my code work fine?
regards
Maciej Kotok
Im trying to use the TextBoxEx Control in my Smart Device Application. Im
new with the OpenNETCF and I have some problems with the mouse events. I
have an object of textBoxEx class named textBox1 and I want to handle some
mouse event - let say Click. Here is my code:
using System;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.Data;
using OpenNETCF.Windows.Forms;
namespace temp
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private OpenNETCF.Windows.Forms.TextBoxEx textBox1;
private System.Windows.Forms.MainMenu mainMenu1;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// textBox1
//
this.textBox1 = new TextBoxEx();
this.textBox1.Location = new System.Drawing.Point(8, 8);
this.textBox1.Multiline = true;
this.textBox1.Size = new System.Drawing.Size(224, 108);
this.textBox1.Text = "textBox1";
this.Controls.Add(textBox1);
this.textBox1.Click +=new EventHandler(textBox1_Click);
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
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 InitializeComponent()
{
this.mainMenu1 = new System.Windows.Forms.MainMenu();
//
// Form1
//
this.Menu = this.mainMenu1;
this.MinimizeBox = false;
this.Text = "Form1";
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main()
{
ApplicationEx.Run(new Form1());
}
private void textBox1_Click(object sender, EventArgs e)
{
MessageBox.Show("Textbox1 Click");
}
}
}
There must me something wrong with it because it dosent work. The
textBox1_Click method dosen't activate. Is there anything else that i should
do to make my code work fine?
regards
Maciej Kotok