This maybe a simple question…I want to disable Minimize/Maximize component from RichTextBox.
I tried to check the properties of RichTextBox, I couldn’t succeed to disable these components.
I want to keep the x close component but I want to disable Minimize/Maximize component from RichTextBox.
private void button1_Click(object sender, EventArgs e)
{
ShowRichMessageBox(FileSelected, File.ReadAllText(FileSelected));
}
private void ShowRichMessageBox(string title, string message)
{
RichTextBox rtbMessage = new RichTextBox();
rtbMessage.Text = message;
Form RichMessageBox = new Form();
RichMessageBox.Text = title;
RichMessageBox.Controls.Add(rtbMessage);
RichMessageBox.ShowDialog();
}
The idea is to display a message in a RichTextBox of the read file.
Use the
MinimizeBoxandMaximizeBoxproperties of theForm.Try this: