private void selectlistBox_SelectedIndexChanged(object sender, EventArgs e) { string find = selectlistBox.SelectedItem.ToString(); NovelBox.Select(NovelBox.Text.IndexOf(find), find.Length); NovelBox.ScrollToCaret(); NovelBox.Focus(); }
/// <summary> /// 双击windows右下角的icon图标 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e) { this.Show(); WindowState = FormWindowState.Normal; NovelBox.Select(); }