kurt69
Well-known member
Hey what am I doing wrong here, I have a picturebox with a dropdown list above it, I want it so when an item in the dropdown list is selected it loads the specified image in the picture box.
comboChar is the dropdown listbox and charChoice is the picturebox.
Also how do I preload external images and sound? Currently I just have the sound file play and instantly stop at the splash screen, didn't know what to do with the images though.
comboChar is the dropdown listbox and charChoice is the picturebox.
VB.NET:
Private Sub comboChar_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles comboChar.SelectedIndexChanged
charPortrait = comboChar.SelectedItem
charChoice.Image.FromFile(Application.StartupPath & "\resources\images\portraits\" & charPortrait & ".bmp")
End Sub