The abovementioned code

G

Guest

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using Microsoft.Ink;

namespace DumbPictureBox
{
public class Form1 : System.Windows.Forms.Form
{
private Microsoft.Ink.InkPicture myInkPicture;
private System.Windows.Forms.Button button_toInk;
private System.Windows.Forms.Button button_toSelect;
private System.ComponentModel.Container components = null;
Graphics g;
public Form1()
{
InitializeComponent();
g=myInkPicture.CreateGraphics();
myInkPicture.DefaultDrawingAttributes.Color=Color.Black;
myInkPicture.DefaultDrawingAttributes.Width=10;
}

protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Código generado por el Diseñador de Windows Forms

private void InitializeComponent()
{
this.myInkPicture = new Microsoft.Ink.InkPicture();
this.button_toInk = new System.Windows.Forms.Button();
this.button_toSelect = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// myInkPicture
//
this.myInkPicture.BackColor =
System.Drawing.SystemColors.ControlLightLight;
this.myInkPicture.Location = new System.Drawing.Point(16, 80);
this.myInkPicture.MarginX = -2147483648;
this.myInkPicture.MarginY = -2147483648;
this.myInkPicture.Name = "myInkPicture";
this.myInkPicture.Size = new System.Drawing.Size(256, 160);
this.myInkPicture.TabIndex = 0;
this.myInkPicture.Paint += new
System.Windows.Forms.PaintEventHandler(this.myInkPicture_Paint);
//
// button_toInk
//
this.button_toInk.Location = new System.Drawing.Point(32, 32);
this.button_toInk.Name = "button_toInk";
this.button_toInk.TabIndex = 1;
this.button_toInk.Text = "To Ink";
this.button_toInk.Click += new System.EventHandler(this.button1_Click);
//
// button_toSelect
//
this.button_toSelect.Location = new System.Drawing.Point(128, 32);
this.button_toSelect.Name = "button_toSelect";
this.button_toSelect.TabIndex = 2;
this.button_toSelect.Text = "To Select";
this.button_toSelect.Click += new System.EventHandler(this.button2_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 266);
this.Controls.Add(this.button_toSelect);
this.Controls.Add(this.button_toInk);
this.Controls.Add(this.myInkPicture);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);

}
#endregion

[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void button1_Click(object sender, System.EventArgs e)
{
myInkPicture.EditingMode=InkOverlayEditingMode.Ink;

}
private void button2_Click(object sender, System.EventArgs e)
{
myInkPicture.EditingMode=InkOverlayEditingMode.Select;
}

private void myInkPicture_Paint(object sender,
System.Windows.Forms.PaintEventArgs e)
{
}
}
}


Thx
 
K

Kevin Spencer

Thx

You're welcome. Thanks for sharing, and come on back if you have any
questions.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

Alvaro Enríquez de Luna said:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using Microsoft.Ink;

namespace DumbPictureBox
{
public class Form1 : System.Windows.Forms.Form
{
private Microsoft.Ink.InkPicture myInkPicture;
private System.Windows.Forms.Button button_toInk;
private System.Windows.Forms.Button button_toSelect;
private System.ComponentModel.Container components = null;
Graphics g;
public Form1()
{
InitializeComponent();
g=myInkPicture.CreateGraphics();
myInkPicture.DefaultDrawingAttributes.Color=Color.Black;
myInkPicture.DefaultDrawingAttributes.Width=10;
}

protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Código generado por el Diseñador de Windows Forms

private void InitializeComponent()
{
this.myInkPicture = new Microsoft.Ink.InkPicture();
this.button_toInk = new System.Windows.Forms.Button();
this.button_toSelect = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// myInkPicture
//
this.myInkPicture.BackColor =
System.Drawing.SystemColors.ControlLightLight;
this.myInkPicture.Location = new System.Drawing.Point(16, 80);
this.myInkPicture.MarginX = -2147483648;
this.myInkPicture.MarginY = -2147483648;
this.myInkPicture.Name = "myInkPicture";
this.myInkPicture.Size = new System.Drawing.Size(256, 160);
this.myInkPicture.TabIndex = 0;
this.myInkPicture.Paint += new
System.Windows.Forms.PaintEventHandler(this.myInkPicture_Paint);
//
// button_toInk
//
this.button_toInk.Location = new System.Drawing.Point(32, 32);
this.button_toInk.Name = "button_toInk";
this.button_toInk.TabIndex = 1;
this.button_toInk.Text = "To Ink";
this.button_toInk.Click += new System.EventHandler(this.button1_Click);
//
// button_toSelect
//
this.button_toSelect.Location = new System.Drawing.Point(128, 32);
this.button_toSelect.Name = "button_toSelect";
this.button_toSelect.TabIndex = 2;
this.button_toSelect.Text = "To Select";
this.button_toSelect.Click += new System.EventHandler(this.button2_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 266);
this.Controls.Add(this.button_toSelect);
this.Controls.Add(this.button_toInk);
this.Controls.Add(this.myInkPicture);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);

}
#endregion

[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void button1_Click(object sender, System.EventArgs e)
{
myInkPicture.EditingMode=InkOverlayEditingMode.Ink;

}
private void button2_Click(object sender, System.EventArgs e)
{
myInkPicture.EditingMode=InkOverlayEditingMode.Select;
}

private void myInkPicture_Paint(object sender,
System.Windows.Forms.PaintEventArgs e)
{
}
}
}


Thx
 
G

Guest

It was a mistake, i pressed 'new' instead 'reply', but i couldnt erase it.
Search for "Clearing selection in inkpicture" and try to help instead posting
this way.

Alvaro Enriquez de Luna.

Kevin Spencer said:

You're welcome. Thanks for sharing, and come on back if you have any
questions.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

Alvaro Enríquez de Luna said:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using Microsoft.Ink;

namespace DumbPictureBox
{
public class Form1 : System.Windows.Forms.Form
{
private Microsoft.Ink.InkPicture myInkPicture;
private System.Windows.Forms.Button button_toInk;
private System.Windows.Forms.Button button_toSelect;
private System.ComponentModel.Container components = null;
Graphics g;
public Form1()
{
InitializeComponent();
g=myInkPicture.CreateGraphics();
myInkPicture.DefaultDrawingAttributes.Color=Color.Black;
myInkPicture.DefaultDrawingAttributes.Width=10;
}

protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Código generado por el Diseñador de Windows Forms

private void InitializeComponent()
{
this.myInkPicture = new Microsoft.Ink.InkPicture();
this.button_toInk = new System.Windows.Forms.Button();
this.button_toSelect = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// myInkPicture
//
this.myInkPicture.BackColor =
System.Drawing.SystemColors.ControlLightLight;
this.myInkPicture.Location = new System.Drawing.Point(16, 80);
this.myInkPicture.MarginX = -2147483648;
this.myInkPicture.MarginY = -2147483648;
this.myInkPicture.Name = "myInkPicture";
this.myInkPicture.Size = new System.Drawing.Size(256, 160);
this.myInkPicture.TabIndex = 0;
this.myInkPicture.Paint += new
System.Windows.Forms.PaintEventHandler(this.myInkPicture_Paint);
//
// button_toInk
//
this.button_toInk.Location = new System.Drawing.Point(32, 32);
this.button_toInk.Name = "button_toInk";
this.button_toInk.TabIndex = 1;
this.button_toInk.Text = "To Ink";
this.button_toInk.Click += new System.EventHandler(this.button1_Click);
//
// button_toSelect
//
this.button_toSelect.Location = new System.Drawing.Point(128, 32);
this.button_toSelect.Name = "button_toSelect";
this.button_toSelect.TabIndex = 2;
this.button_toSelect.Text = "To Select";
this.button_toSelect.Click += new System.EventHandler(this.button2_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 266);
this.Controls.Add(this.button_toSelect);
this.Controls.Add(this.button_toInk);
this.Controls.Add(this.myInkPicture);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);

}
#endregion

[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void button1_Click(object sender, System.EventArgs e)
{
myInkPicture.EditingMode=InkOverlayEditingMode.Ink;

}
private void button2_Click(object sender, System.EventArgs e)
{
myInkPicture.EditingMode=InkOverlayEditingMode.Select;
}

private void myInkPicture_Paint(object sender,
System.Windows.Forms.PaintEventArgs e)
{
}
}
}


Thx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top