?? form4.cs
字號:
?using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form4 : Form
{
public Form4()
{
InitializeComponent();
}
public RichTextBox s1;
public int start;
private void button1_Click(object sender, EventArgs e)
{
string str1;
str1 = textBox1.Text;
if (str1 == "")
{
MessageBox.Show("請確認(rèn)查找內(nèi)容!", "異常警示");
}
else
{
start = s1.Find(str1, start, RichTextBoxFinds.MatchCase);
if (start == -1)
{
MessageBox.Show("已經(jīng)查到文檔的結(jié)尾!", "結(jié)束查找");
start = 0;
s1.Focus();
}
else
{
start = start + str1.Length;
s1.Focus();
}
}
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
private void Form4_Load(object sender, EventArgs e)
{
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -