I'm making a digital clock and I could not decide what background picture to use. I collected 4 and I want to be able to change the background from the program. For example using combobox to select the background picture. I experimented with code but could not come up with an answer. Can anyone help me?
I'm using 2005 VB Express Edition
Last edited by PascalPro; 06-22-2008 at 10:27 AM. Reason: Include more Information
Can't you in the combo box specify items and use a click event for each item in the combo box?
Couldn't you do that for each item in the combo box?Code:Private Sub cmbBoxitem1 _Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles cmbBoxitem1.Click Me.background = "filename.ext" End Sub
You don't have to assign an event handler to each item in the combo box. Just trap the click event, like he said, and then do a select case on the the selected combo item, or else have the text in the combo actually be the filename. I'd post some code, but I don't have .NET installed at home, sorry.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks