本文整理汇总了C#中System.Windows.Forms.RichTextBox.Hide方法的典型用法代码示例。如果您正苦于以下问题:C# RichTextBox.Hide方法的具体用法?C# RichTextBox.Hide怎么用?C# RichTextBox.Hide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.RichTextBox
的用法示例。
在下文中一共展示了RichTextBox.Hide方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: rich_TextChanged
private void rich_TextChanged(object sender, EventArgs e)
{
if (m_busy)
return;
m_busy = true;
m_buffer.Text = m_active.Text;
m_buffer.SelectAll();
m_buffer.SelectionColor = m_defaultColor;
ControlEventArgs args = new ControlEventArgs(m_buffer);
OnHighlight(args);
m_buffer.SelectionStart = m_active.SelectionStart;
m_buffer.SelectionLength = m_active.SelectionLength;
Native.SCROLLINFO si = new Native.SCROLLINFO();
si.Size = (uint)Marshal.SizeOf(typeof(Native.SCROLLINFO));
si.Mask = Native.SIF_POS;
Native.GetScrollInfo(m_active.Handle, (int)Native.SB_VERT, ref si);
Native.SetScrollInfo(m_buffer.Handle, (int)Native.SB_VERT, ref si, true);
uint wparam = ((uint)si.Pos << 16) + Native.SB_THUMBPOSITION;
Native.SendMessage(m_buffer.Handle, Native.WM_VSCROLL, wparam, 0);
Native.SendMessage(m_buffer.Handle, Native.WM_VSCROLL, Native.SB_ENDSCROLL, 0);
m_busy = false;
RichTextBox temp = m_active;
m_active = m_buffer;
m_buffer = temp;
m_active.BringToFront();
m_active.Show();
m_buffer.Hide();
m_active.Focus();
}