|
||||||
| Visual Basic Programming Discussion forum for Visual Basic, an event driven programming language and associated development environment from Microsoft for its COM programming model. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
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 12:27 PM. Reason: Include more Information |
| Sponsored Links |
|
|
|
|||||
|
What sort of control is displaying the clock? A label?
|
|
|||||
|
Can't you in the combo box specify items and use a click event 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
__________________
Success is the ability to go from failure to failure without losing your enthusiasm. ~ Winston Churchill Braingle |
|
|||
|
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.
|
| Sponsored Links |
|
|
|
|||||
|
Yeah - some simple string concatenation would be ideal - just grab the ComboBox's Text property, then put it inside a file name.
|
![]() |
| Tags |
| box, clock, combo |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to make image straight - Photoshop | ahsan16 | Photoshop Tutorials | 56 | 07-30-2008 03:11 PM |
| Help with image upload script - need to make an if null statement | norbie | PHP Forum | 7 | 05-04-2008 09:44 AM |
| adding an image as the background | wholikesforms? | easyContact | 1 | 12-06-2007 07:00 AM |
| Resize Images And Maintain Original Sharpness | AfTriX | Photoshop Tutorials | 7 | 04-20-2007 09:55 AM |
Goal: 100,000 Posts
Complete: 68%