hi guys, I am a Beginer Programmer. :confused:
I Like to Learn about C# and i started from a week ago.
I Searched in google to find a froum to get some help about C#.
and i found this website.i hope i can find some friend to get help.
For first Question, i want to make a project and i have some question about it.
i have a Main page ( Form1 ) and i have a ComboBox on it.
i made a ComboBox with Readonly( true) and i put a RichTextBox under this ComboBox on mainpage.
now, in ComboBox i have 2 selecteditem.
i want to know how to write code for combobox that if someone klicked on first selecteditem in combobox then he will see in richtextbox for example ( hello ) , if he klicked on second he will see in richtextbox ( bye )?
Can someone please help me?
Thank you so much :p

hi guys, I am a Beginer Programmer. :confused:
I Like to Learn about C# and i started from a week ago.
I Searched in google to find a froum to get some help about C#.
and i found this website.i hope i can find some friend to get help.
For first Question, i want to make a project and i have some question about it.
i have a Main page ( Form1 ) and i have a ComboBox on it.
i made a ComboBox with Readonly( true) and i put a RichTextBox under this ComboBox on mainpage.
now, in ComboBox i have 2 selecteditem.
i want to know how to write code for combobox that if someone klicked on first selecteditem in combobox then he will see in richtextbox for example ( hello ) , if he klicked on second he will see in richtextbox ( bye )?
Can someone please help me?
Thank you so much :p

We are more than willing to help, but we don't do the work for you. The idea is that you take the effort to learn for yourself, and when you get stuck or don't understand why something is not working or working for that matter, you can post the details here.

I would start with either a textbook or my personal choice is to go to the web and do a little research.

here is an ok link to a C# tutorial and slide show : http://www.devhood.com/training_modules/dist-a/LearningCSharp/?module_id=2

One question is what version are you looking to learn? The latest and greatest version (3.0 framework) or C# on the 1.1 or 2.0 framework. I would personally recommend 2.0, but that is just a personal choice at this time.

Also, are you wanting to learn it for the web (i.e. ASP.NET with C#) or for Windows API (C# programming) ??


Here is a link to some other things that may help you get started:

Learning ASP.NET : http://www.asp.net/getstarted/default.aspx?tabid=61

C# General
http://www.c-sharpcorner.com/

Also I would spend some time reading the forums here as you may pick up a thing or two that will lead you to your answers.

Good luck.:cool:

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
textBox1.Text = "";
if (comboBox1.SelectedIndex.Equals(0) )

textBox1.Text = "hello";
if (comboBox1.SelectedIndex.Equals(1))
textBox1.Text = "bye";

}

It can be achieved as:

if (cmbo.selectedindex==0) /////it will return first selected item...
rtb.text="Hello";
if (cmbo.selecteditem==1)////it willl return second
rtb.text="bye";


i think it will work.try it :regards

hi guys, I am a Beginer Programmer. :confused:
I Like to Learn about C# and i started from a week ago.
I Searched in google to find a froum to get some help about C#.
and i found this website.i hope i can find some friend to get help.
For first Question, i want to make a project and i have some question about it.
i have a Main page ( Form1 ) and i have a ComboBox on it.
i made a ComboBox with Readonly( true) and i put a RichTextBox under this ComboBox on mainpage.
now, in ComboBox i have 2 selecteditem.
i want to know how to write code for combobox that if someone klicked on first selecteditem in combobox then he will see in richtextbox for example ( hello ) , if he klicked on second he will see in richtextbox ( bye )?
Can someone please help me?
Thank you so much :p

hope this will help u

richtextbox=combobox.selectedItem

Comments
Don't bump old threads
This article has been dead for over six months. Start a new discussion instead.