<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp_by_API%2FSystem.Windows.Forms%2FKeyPressEventArgs</id>
		<title>Csharp/C Sharp by API/System.Windows.Forms/KeyPressEventArgs - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp_by_API%2FSystem.Windows.Forms%2FKeyPressEventArgs"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Windows.Forms/KeyPressEventArgs&amp;action=history"/>
		<updated>2026-04-30T13:44:44Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Windows.Forms/KeyPressEventArgs&amp;diff=4080&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Windows.Forms/KeyPressEventArgs&amp;diff=4080&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:35Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 15:31, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Windows.Forms/KeyPressEventArgs&amp;diff=4081&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.Windows.Forms/KeyPressEventArgs&amp;diff=4081&amp;oldid=prev"/>
				<updated>2010-05-26T12:09:10Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==KeyPressEventArgs.Handled==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;  &lt;br /&gt;
using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.Data;&lt;br /&gt;
public class TextCancelEventKeyEvent : System.Windows.Forms.Form&lt;br /&gt;
{&lt;br /&gt;
  private System.Windows.Forms.Label label1;&lt;br /&gt;
  private System.Windows.Forms.TextBox txtInput;&lt;br /&gt;
  private System.Windows.Forms.Label label2;&lt;br /&gt;
  private System.Windows.Forms.Label lblTrue;&lt;br /&gt;
  private System.Windows.Forms.Label label3;&lt;br /&gt;
  private System.Windows.Forms.Label lblCheck;&lt;br /&gt;
    private System.Windows.Forms.Label lblResults;&lt;br /&gt;
  public TextCancelEventKeyEvent()&lt;br /&gt;
  {&lt;br /&gt;
    InitializeComponent();&lt;br /&gt;
  }&lt;br /&gt;
  private void InitializeComponent()&lt;br /&gt;
  {&lt;br /&gt;
     this.label1 = new System.Windows.Forms.Label();&lt;br /&gt;
     this.txtInput = new System.Windows.Forms.TextBox();&lt;br /&gt;
     this.label2 = new System.Windows.Forms.Label();&lt;br /&gt;
     this.lblTrue = new System.Windows.Forms.Label();&lt;br /&gt;
     this.label3 = new System.Windows.Forms.Label();&lt;br /&gt;
     this.lblCheck = new System.Windows.Forms.Label();&lt;br /&gt;
     this.lblResults = new System.Windows.Forms.Label();&lt;br /&gt;
     this.SuspendLayout();&lt;br /&gt;
     // &lt;br /&gt;
     // label1&lt;br /&gt;
     // &lt;br /&gt;
     this.label1.Font = new System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 14.25F, (System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic), System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));&lt;br /&gt;
     this.label1.Location = new System.Drawing.Point(48, 16);&lt;br /&gt;
     this.label1.Name = &amp;quot;label1&amp;quot;;&lt;br /&gt;
     this.label1.Size = new System.Drawing.Size(176, 23);&lt;br /&gt;
     this.label1.TabIndex = 0;&lt;br /&gt;
     this.label1.Text = &amp;quot;ISBN Validation&amp;quot;;&lt;br /&gt;
     // &lt;br /&gt;
     // txtInput&lt;br /&gt;
     // &lt;br /&gt;
     this.txtInput.Location = new System.Drawing.Point(72, 64);&lt;br /&gt;
     this.txtInput.Name = &amp;quot;txtInput&amp;quot;;&lt;br /&gt;
     this.txtInput.TabIndex = 1;&lt;br /&gt;
     this.txtInput.Text = &amp;quot;&amp;quot;;&lt;br /&gt;
     this.txtInput.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtInput_KeyPress);&lt;br /&gt;
     this.txtInput.Validating += new System.ruponentModel.CancelEventHandler(this.handleCancleEvent);&lt;br /&gt;
     // &lt;br /&gt;
     // label2&lt;br /&gt;
     // &lt;br /&gt;
     this.label2.Location = new System.Drawing.Point(24, 104);&lt;br /&gt;
     this.label2.Name = &amp;quot;label2&amp;quot;;&lt;br /&gt;
     this.label2.Size = new System.Drawing.Size(80, 23);&lt;br /&gt;
     this.label2.TabIndex = 2;&lt;br /&gt;
     this.label2.Text = &amp;quot;True Number:&amp;quot;;&lt;br /&gt;
     // &lt;br /&gt;
     // lblTrue&lt;br /&gt;
     // &lt;br /&gt;
     this.lblTrue.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;&lt;br /&gt;
     this.lblTrue.Location = new System.Drawing.Point(112, 104);&lt;br /&gt;
     this.lblTrue.Name = &amp;quot;lblTrue&amp;quot;;&lt;br /&gt;
     this.lblTrue.TabIndex = 3;&lt;br /&gt;
     // &lt;br /&gt;
     // label3&lt;br /&gt;
     // &lt;br /&gt;
     this.label3.Location = new System.Drawing.Point(32, 152);&lt;br /&gt;
     this.label3.Name = &amp;quot;label3&amp;quot;;&lt;br /&gt;
     this.label3.Size = new System.Drawing.Size(72, 23);&lt;br /&gt;
     this.label3.TabIndex = 4;&lt;br /&gt;
     this.label3.Text = &amp;quot;Check Digit:&amp;quot;;&lt;br /&gt;
     // &lt;br /&gt;
     // lblCheck&lt;br /&gt;
     // &lt;br /&gt;
     this.lblCheck.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;&lt;br /&gt;
     this.lblCheck.Location = new System.Drawing.Point(112, 152);&lt;br /&gt;
     this.lblCheck.Name = &amp;quot;lblCheck&amp;quot;;&lt;br /&gt;
     this.lblCheck.TabIndex = 5;&lt;br /&gt;
     // &lt;br /&gt;
     // lblResults&lt;br /&gt;
     // &lt;br /&gt;
     this.lblResults.Location = new System.Drawing.Point(56, 192);&lt;br /&gt;
     this.lblResults.Name = &amp;quot;lblResults&amp;quot;;&lt;br /&gt;
     this.lblResults.Size = new System.Drawing.Size(152, 24);&lt;br /&gt;
     this.lblResults.TabIndex = 8;&lt;br /&gt;
     // &lt;br /&gt;
     // TextCancelEventKeyEvent&lt;br /&gt;
     // &lt;br /&gt;
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);&lt;br /&gt;
     this.ClientSize = new System.Drawing.Size(264, 293);&lt;br /&gt;
     this.Controls.AddRange(new System.Windows.Forms.Control[] {&lt;br /&gt;
                                                                  this.lblResults,&lt;br /&gt;
                                                                  this.lblCheck,&lt;br /&gt;
                                                                  this.label3,&lt;br /&gt;
                                                                  this.lblTrue,&lt;br /&gt;
                                                                  this.label2,&lt;br /&gt;
                                                                  this.txtInput,&lt;br /&gt;
                                                                  this.label1});&lt;br /&gt;
     this.ResumeLayout(false);&lt;br /&gt;
  }&lt;br /&gt;
  [STAThread]&lt;br /&gt;
  static void Main() &lt;br /&gt;
  {&lt;br /&gt;
    Application.Run(new TextCancelEventKeyEvent());&lt;br /&gt;
  }&lt;br /&gt;
  private void handleCancleEvent(object sender, System.ruponentModel.CancelEventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
    TextBox tb = (TextBox)sender;&lt;br /&gt;
    string strInput = tb.Text;&lt;br /&gt;
        Console.WriteLine(strInput);&lt;br /&gt;
  }     &lt;br /&gt;
  private void txtInput_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)&lt;br /&gt;
  {&lt;br /&gt;
     char keyChar;&lt;br /&gt;
     keyChar = e.KeyChar;&lt;br /&gt;
     if(!Char.IsDigit(keyChar)      // 0 - 9&lt;br /&gt;
        &amp;amp;&amp;amp;&lt;br /&gt;
        keyChar != 8               // backspace&lt;br /&gt;
        &amp;amp;&amp;amp;&lt;br /&gt;
        keyChar != 13              // enter&lt;br /&gt;
        &amp;amp;&amp;amp;&lt;br /&gt;
        keyChar != &amp;quot;x&amp;quot;&lt;br /&gt;
        &amp;amp;&amp;amp;&lt;br /&gt;
        keyChar != 45              //  dash/minus&lt;br /&gt;
        ){&lt;br /&gt;
        //  Do not display the keystroke&lt;br /&gt;
        e.Handled = true;&lt;br /&gt;
     }&lt;br /&gt;
  }     &lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>