chou0623 Posted November 22, 2003 Posted November 22, 2003 (edited) Dear all, I am stocked in step e. See below. Can anyone help me? Thanks a lot. I need to code an application that allows the user to display an image that corresponds to the item selected in a list box. Step a. open the image solution. step b. set the list box's sorted property to true. step c. create a new form-level collection named mpictureboxcollection. step d. in the form's load event procedure, add the cloudpiceturebox, lightingpicturebox,rainpicturebox,snowpicturebox, and sunpicturebox controls to the mpictureboxcollection. after doing so, fill the elementlistbox with the following items: cloud, rain,snow,sun,and lighting, then select the first item in the list.(hint: when adding the picture boxes to the mpictureboxcollection, assign a key to each picture box. Relate each picture box's key to the index of its associated item in the list box.) step e. code the list box's selectedvaluechanged event procedure so that it displays, in the elementpicturebox control, the image that corresponds to the item selected in the list box. Below is the code that I have done so far Private Sub ImageForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'add CloudPictureBox control to mPictureBoxCollection mPictureBoxCollection.Add(Me.CloudPictureBox) 'add RainPictureBox control to mPictureBoxCollection mPictureBoxCollection.Add(Me.RainPictureBox) 'add SnowPictureBox control to mPictureBoxCollection mPictureBoxCollection.Add(Me.SnowPictureBox) 'add SunPictureBox control to mPictureBoxCollection mPictureBoxCollection.Add(Me.SunPictureBox) 'add LightningPictureBox control to mPictureBoxCollection mPictureBoxCollection.Add(Me.LightningPictureBox) ' Fill the elementlistbox with cloud,rain,snow,sun, and lighting Me.ElementListBox.Items.Add("Cloud") Me.ElementListBox.Items.Add("Rain") Me.ElementListBox.Items.Add("Snow") Me.ElementListBox.Items.Add("Sun") Me.ElementListBox.Items.Add("Lightning") End Sub Private Sub ElementListBox_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ElementListBox.SelectedValueChanged Edited November 22, 2003 by Robby Quote
Moderators Robby Posted November 22, 2003 Moderators Posted November 22, 2003 You're attached zip contains 10 seperate solutions, I'm not sure what you expect us to do with it. Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.