Camposha
  • Android
    • Introduction
    • Components
    • Communication
    • DateTime
    • FileSystem
    • HTTP
    • Local Database
    • Permissions
    • Scheduler
    • System
    • Widgets
    • Threading
    • Animation and Motion
    • Hardware and Sensors
  • C#
  • Flutter
  • Java
  • Javascript
  • Python
Wednesday, January 20, 2021
No Result
View All Result
  • Login
  • Register
Buy Projects
  • Android
    • Introduction
    • Components
    • Communication
    • DateTime
    • FileSystem
    • HTTP
    • Local Database
    • Permissions
    • Scheduler
    • System
    • Widgets
    • Threading
    • Animation and Motion
    • Hardware and Sensors
  • C#
  • Flutter
  • Java
  • Javascript
  • Python
No Result
View All Result
Camposha
No Result
View All Result
Home Programming

VB.NET Array – Populate ComboBox

Oclemy by Oclemy
2 years ago
in Programming
A A
4k
VIEWS
Share on FacebookShare on Twitter

In this tutorial we see how to populate a VB.NET combobox from a string array.

Then we handle teh combobox’ selected index changed event and show the item in a messagebox.

Let’s go.

Imports System
Imports System.Drawing
Imports System.Windows.Forms
Module Module1

    Private WithEvents comboBox As ComboBox

    Sub Main()
        Dim myForm As Form = New Form() With {.Text = "WinForms ComboBox - Array", .ClientSize = New Size(564, 420)}
        comboBox = New ComboBox With {.Location = New Point(164, 176), .DropDownStyle = ComboBoxStyle.DropDownList}
        Dim nebulae As String() = {"Horse Head", "Black Widow", "Ghost Head", "Cat's Eye", "Elephant's Trunk", "Helix", "Rosette", "Snake", "Bernad 68", "Ant", "Orion", "Butterfly", "Eagle", "Own", "Ring", "Pelican", "Cone", "Flame", "Witch Head", "Bumerang"}
        comboBox.DataSource = nebulae
        myForm.Controls.Add(comboBox)
        Application.Run(myForm)
    End Sub

    Private Sub comboBox_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles comboBox.SelectedIndexChanged
        MessageBox.Show(comboBox.SelectedItem.ToString())
    End Sub
End Module

Result

Share16Tweet10Send
Oclemy

Oclemy

When I was a 2nd year Software Engineering student, I buillt a now defunct online tool called Camposha(from Campus Share) using my then favorite language C#(ASP.NET) to compete OLX in my country(Kenya). The idea was to target campus students in Kenya. I got a few hundred signups but competing OLX proved too daunting. I decided to focus on my studies, learning other languages like Java,Python,Kotlin etc while meanwhile publishing tutorials at my YouTube Channel ProgrammingWizards TV which led to this site(camposha.info). Say hello or post me a suggestion: oclemmi@gmail.com . Follow me below; Github , and on my channel: ProgrammingWizards TV

Get Free Projects

Featured Projects

  • Become a Premium Member $30.00
  • CoronaVirus News App - Kotlin+MVVM+Firebase+Cloud Storage+Authentication+PageViews $12.00 $4.99
  • Largest Stars App - Kotlin+MySQL+MVVM+Retrofit2 Multipart+Data Binding+Disk Caching(2 Apps-Kotlin,Java) $12.00 $4.99
  • Alien Planets App - MVVM+Firebase+Cloud Storage(2 Apps-Kotlin,Java) $10.00 $4.99
  • Retrofit MySQL Multipart Images CRUD - UPLOAD DOWNLOAD UPDATE DELETE Full $10.00 $3.99

My Udemy Courses

Android MySQL Retrofit2 Multipart CRUD,Search,Pagination€19.99€14.99
Beginner Friendly Full Offline Android Apps Creation(Room)€19.99€14.99
Android Firebase MVVM Jetpack - Many Offline-First CRUD Apps€19.99€14.99
Kotlin Firebase CRUD,Cloud Storage,MVVM (Works even Offline)€19.99€14.99

Popular

  • Flutter PHP MySQL – Fill ListView with Images and Text

    46 shares
    Share 18 Tweet 12
  • Kotlin Android SQLite Simple CRUD – INSERT SELECT UPDATE DELETE

    46 shares
    Share 18 Tweet 12
  • Flutter SearchView Examples – ListView Search/Filter

    46 shares
    Share 18 Tweet 12
  • Kotlin Android Capture From Camera or Pick Image

    45 shares
    Share 18 Tweet 11
  • Android MySQL – Insert From EditText,CheckBox,Spinner – Part 4 [PHP Code]

    44 shares
    Share 18 Tweet 11
  • Trending
  • Comments
  • Latest

Flutter PHP MySQL – Fill ListView with Images and Text

December 19, 2020

Kotlin Android SQLite Simple CRUD – INSERT SELECT UPDATE DELETE

December 19, 2020
Flutter AppBar SearchView

Flutter SearchView Examples – ListView Search/Filter

December 19, 2020
Kotlin Android Capture From Camera or Pick Image

Kotlin Android Capture From Camera or Pick Image

December 19, 2020
CoronaVirus News App – Kotlin + MVVM + Firebase + Cloud Storage + Authentication+PageViews Count(Works even Offline)

CoronaVirus News App – Kotlin + MVVM + Firebase + Cloud Storage + Authentication+PageViews Count(Works even Offline)

10

Android Firebase RecyclerView MasterDetail CRUD Images Text – Upload, READ, DELETE

5

Android Retrofit – JSON ListView Images and Text

3

Framework7 Cordova – Compile App to APK and Install in Android Device/Emulator

3

Android Shared Element Transition Examples

December 27, 2020

Best Android Swipe Cards Libraries and Examples

December 27, 2020
Retrofit

Retrofit

December 19, 2020
Fast Networking Library

Fast Networking Library

December 19, 2020
  • Android
  • C#
  • Flutter
  • Java
  • Javascript
  • Python

Copyright © 2020 Camposha All Rights Reserved.

No Result
View All Result
  • Account
  • Activate
  • Activity
  • Become a Teacher
  • Become a Teacher
  • Become a Teacher
  • Become instructor
  • Blog
  • Blog
  • Cancel Payment
  • Cancel Payment
  • Cart
  • Change Password
  • Change Password
  • Checkout
  • Checkout
  • Checkout
  • Contact
  • Contact
  • Contact Us
  • Content restricted
  • Course Checkout
  • Dashboard
  • Edit Profile
  • Edit Profile
  • FAQs
  • Forgot Password
  • Forgot Password
  • Guest
  • Guest
  • Home
  • Home
  • Home Light
  • Instructor Dashboard
  • Instructor Registration
  • IUMP – Account Page
  • IUMP – Default Redirect Page
  • IUMP – Login
  • IUMP – LogOut
  • IUMP – Register
  • IUMP – Reset Password
  • IUMP – TOS Page
  • IUMP – Visitor Inside User Page
  • List courses
  • List wish list
  • Login
  • Login
  • Maintenance
  • Members
  • Membership Account
    • Membership Billing
    • Membership Cancel
    • Membership Checkout
    • Membership Confirmation
    • Membership Invoice
    • Membership Levels
  • Membership Account
    • Membership Billing
    • Membership Cancel
    • Membership Checkout
    • Membership Confirmation
    • Membership Invoice
    • Membership Levels
  • Membership Plans
  • My Account
  • OnePage Documentation
  • Portfolio Grid
  • Portfolio Masonry
  • Portfolio Multigrid
  • Privacy Policy
  • Products
  • Profile
  • Profile
  • Profile
  • Projects
  • Register
  • Register
  • Register
  • Register
  • Sample Page
  • Shop
  • Sign in
  • Sign up
  • Student profile
  • Student Registration
  • Thank You
  • Thank You

Copyright © 2020 Camposha All Rights Reserved.

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms below to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In

Login

Forgot Password?

Create a new account

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.