Question a bit of problem

skp03

New member
Joined
Dec 6, 2011
Messages
2
Programming Experience
Beginner
how to write a programme for a list box having 10 items in that just by a single click on one of the item it should be written on the button

if a list is containing notepad than by clicking on the button it should open the notepad

i hope i'll be responded as soon as possible
 
First up, please provide meaningful titles for your threads in future. Everyone who posts has a problem so that doesn't help us at all. If everyone used titles like yours then those of us who want to help would have to open every single thread in order to determine which were relevant to us, which would be a big waste of time. Imagine that you opened the kitchen cupboard and it was full of cans that all said "Some Food". You get the idea.

As for the question, you can handle the SelectedIndexChanged event of the ListBox and use the Text property to get the selected value. What you then do with it is up to you. If you want to display it on a Button then by all means do so.

As for opening an application, you can call Process.Start and pass the name/path of the file you want to execute. It's much the same as opening a console window and typing the name/path of the app. Anything you could run that way, you can run with Process.Start.
 
Back
Top