3C科技 娛樂遊戲 美食旅遊 時尚美妝 親子育兒 生活休閒 金融理財 健康運動 寰宇綜合

Zi 字媒體

2017-07-25T20:27:27+00:00
加入好友
C# 文字方塊[textbox] enter執行(觸發) 按鈕[button] 事件程式碼   資料來源: http://blog.udn.com/pgferic/7452066   using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace CS_TextBoxEnterCallButton { public partial class Form1 : Form { public Form1() { InitializeComponent(); }           private void button1_Click(object sender, EventArgs e) { textBox1.Text = textBox1.Text + “-CS_TextBoxEnterCallButton”; }           private void textBox1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { button1.PerformClick();             } }     } }  

本文由jashliaoeuwordpress提供 原文連結

寫了 5860316篇文章,獲得 23313次喜歡
精彩推薦