if i press for example button1, and i want it to have a statement,
button1.
if richtextbox 1 = "" then,
msgbox1. "you have no text".
how do you do this in c#?
I USE VISUAL C# 2010 EXPRESS!
Printable View
if i press for example button1, and i want it to have a statement,
button1.
if richtextbox 1 = "" then,
msgbox1. "you have no text".
how do you do this in c#?
I USE VISUAL C# 2010 EXPRESS!
also one more question, how would i code that, example,
if richtextbox 1 contains word "like",
then change that word to "whatever"
Also is it possible to do this?
for example,
if richtextbox1 contains word "because", then
change it to any of these words,
example,
example,
example,
and random selector.
I use this for a textbox, pretty sure it's close to the same as a rich text box.
Code:if (String.IsNullOrEmpty(textbox.Text))
MessageBox.Show("No text detected, please enter something!");
else
{
//Whatever you want it to do after it's no longer empty.
}