Combo Box

rosshodges

Freshman
Joined
Nov 23, 2002
Messages
28
Sorry to bother you yet again.
I have two questions. Firstly I have a button how do I make it close just the form? and secondly I would like my dropdown menu(combo box) to display infomation e.g Freeserve but I would like the data for Freeserve to be smtp.freeserve.net
Regards,
Ross
 
For the first part of your question:
Visual Basic:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Me.Close()
End Sub

I can't be much help with the second part though sorry :-\

Orbity
 
The Add and AddRange methods of the Items collection take an Object as a parameter, meaning you can create a class that holds whatever you want in it. Just make sure the class overrides ToString() or you'll get a blank item displayed in the ComboBox.
 
Back
Top