Page 1 of 1
Selected listbox item?
Posted: Fri Apr 23, 2010 11:50 pm
by zachman61
im making a office theme changer for my program but im making it simpler but how do i make it so when a certain item is selected and you hit the button then it shows a current theme ?
Re: Selected listbox item?
Posted: Sat Apr 24, 2010 3:50 am
by NoWayIn
Hello Zach, to use the selected item in the listbox you can do something like this :
Code: Select allTry
MsgBox(ListBox1.SelectedItem.ToString)
Catch ex As Exception
MsgBox(ex.Message)
End Try
what that will do is it will give you a MsgBox saying the selected item.
you could change "MsgBox(ListBox1.SelectedItem.ToString)" so it would change your theme.
Re: Selected listbox item?
Posted: Sat Apr 24, 2010 5:06 pm
by Agust1337
Code: Select all If ListBox1.Text = "Office Theme" Then
'office theme is used
End If
Re: Selected listbox item?
Posted: Sat Apr 24, 2010 5:45 pm
by zachman61
thanks both of them worked
