Raised This Month: $12 Target: $400
 3% 

C#


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Heks365
Zero Posts
Join Date: Jan 2020
Old 01-30-2020 , 12:40   C#
Reply With Quote #1

Hello, I need some help with making a quick program for a friend of mine.
What i need help with is this:

I am Using Visual Studio, and now i have a ComboBox that shows some Vehicles (in the Combobox area)

Now i want it to display a Picture of that car when i select it (by arrows or by mouse)

So kinda

If Combobox(text) == ("V70");
{
pictureBox1.Image = Image.FromFile("../pics/V70.jpg");
}
Else if Combobox(text) == ("740");
{
pictureBox1.Image = Image.FromFile("../pics/740.jpg");
}

I know this dont work but i hope you guys understand what i want to do with this
I Surely do appreciate all help and tips (Beginner in this kinda stuff so
Greetings Heks365
Heks365 is offline
thEsp
BANNED
Join Date: Aug 2017
Old 01-30-2020 , 15:04   Re: C#
Reply With Quote #2

Code:
if (CB.Items[CB.SelectedIndex] == "...")
{
    // ...
}
else if (CB.Items[CB.SelectedIndex] == "...2")
{
   // ...
}
I think it should be like this called on ComboBox.OnSelectedIndexChanged, haven't worked in C# for some good months?

Last edited by thEsp; 01-30-2020 at 15:13.
thEsp is offline
Heks365
Zero Posts
Join Date: Jan 2020
Old 01-31-2020 , 09:50   Re: C#
Reply With Quote #3

This didnt work for me. Is there another way
Heks365 is offline
thEsp
BANNED
Join Date: Aug 2017
Old 01-31-2020 , 10:18   Re: C#
Reply With Quote #4

You could try better, couldn't you?
thEsp is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode