Option Explicit On 

Imports AxSftBoxLib45
Imports SftBoxLib45
Imports Softelvdm.OLEConvert

Public Class Form1
    Inherits System.Windows.Forms.Form

    Private BoldFont As Font
    Private sortedColumn As Short = -1
    Private sortDirection As SftBoxSortConstants = SftBoxSortConstants.sortSftBoxAscending

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
Friend WithEvents pictureBox1 As System.Windows.Forms.PictureBox
Friend WithEvents label4 As System.Windows.Forms.Label
Friend WithEvents label3 As System.Windows.Forms.Label
Friend WithEvents companyList As AxSftBoxLib45.AxSftBox
Friend WithEvents imageListUpDown As System.Windows.Forms.ImageList
Friend WithEvents countryList As AxSftBoxLib45.AxSftBox
Friend WithEvents label2 As System.Windows.Forms.Label
Friend WithEvents label1 As System.Windows.Forms.Label
Friend WithEvents closeButton As System.Windows.Forms.Button
Friend WithEvents label5 As System.Windows.Forms.Label
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1))
Me.pictureBox1 = New System.Windows.Forms.PictureBox
Me.label4 = New System.Windows.Forms.Label
Me.label3 = New System.Windows.Forms.Label
Me.companyList = New AxSftBoxLib45.AxSftBox
Me.imageListUpDown = New System.Windows.Forms.ImageList(Me.components)
Me.countryList = New AxSftBoxLib45.AxSftBox
Me.label2 = New System.Windows.Forms.Label
Me.label1 = New System.Windows.Forms.Label
Me.closeButton = New System.Windows.Forms.Button
Me.label5 = New System.Windows.Forms.Label
CType(Me.companyList, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.countryList, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'pictureBox1
'
Me.pictureBox1.Image = CType(resources.GetObject("pictureBox1.Image"), System.Drawing.Image)
Me.pictureBox1.Location = New System.Drawing.Point(306, 167)
Me.pictureBox1.Name = "pictureBox1"
Me.pictureBox1.Size = New System.Drawing.Size(36, 22)
Me.pictureBox1.TabIndex = 15
Me.pictureBox1.TabStop = False
Me.pictureBox1.Visible = False
'
'label4
'
Me.label4.Location = New System.Drawing.Point(14, 242)
Me.label4.Name = "label4"
Me.label4.Size = New System.Drawing.Size(58, 23)
Me.label4.TabIndex = 13
Me.label4.Text = "Country:"
'
'label3
'
Me.label3.Location = New System.Drawing.Point(6, 174)
Me.label3.Name = "label3"
Me.label3.Size = New System.Drawing.Size(278, 46)
Me.label3.TabIndex = 12
Me.label3.Text = "Or use it as a ""regular"" combo box with auto-completion."
'
'companyList
'
Me.companyList.Location = New System.Drawing.Point(6, 114)
Me.companyList.Name = "companyList"
Me.companyList.OcxState = CType(resources.GetObject("companyList.OcxState"), System.Windows.Forms.AxHost.State)
Me.companyList.Size = New System.Drawing.Size(373, 38)
Me.companyList.TabIndex = 11
'
'imageListUpDown
'
Me.imageListUpDown.ImageSize = New System.Drawing.Size(8, 8)
Me.imageListUpDown.ImageStream = CType(resources.GetObject("imageListUpDown.ImageStream"), System.Windows.Forms.ImageListStreamer)
Me.imageListUpDown.TransparentColor = System.Drawing.Color.Red
'
'countryList
'
Me.countryList.Location = New System.Drawing.Point(79, 242)
Me.countryList.Name = "countryList"
Me.countryList.OcxState = CType(resources.GetObject("countryList.OcxState"), System.Windows.Forms.AxHost.State)
Me.countryList.Size = New System.Drawing.Size(212, 19)
Me.countryList.TabIndex = 14
'
'label2
'
Me.label2.Location = New System.Drawing.Point(6, 61)
Me.label2.Name = "label2"
Me.label2.Size = New System.Drawing.Size(366, 53)
Me.label2.TabIndex = 10
Me.label2.Text = "This combo box uses auto-completion, columns can be reordered and sorted.  An eas" & _
"y way to choose from the items offered, sorting and auto-completion make finding" & _
" an item easy!"
'
'label1
'
Me.label1.Location = New System.Drawing.Point(6, 8)
Me.label1.Name = "label1"
Me.label1.Size = New System.Drawing.Size(285, 45)
Me.label1.TabIndex = 9
Me.label1.Text = "This sample shows how the combo box can be used to help on data input forms."
'
'closeButton
'
Me.closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.closeButton.FlatStyle = System.Windows.Forms.FlatStyle.System
Me.closeButton.Location = New System.Drawing.Point(299, 8)
Me.closeButton.Name = "closeButton"
Me.closeButton.Size = New System.Drawing.Size(80, 32)
Me.closeButton.TabIndex = 8
Me.closeButton.Text = "Close"
'
'label5
'
Me.label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.label5.Location = New System.Drawing.Point(4, 264)
Me.label5.Name = "label5"
Me.label5.Size = New System.Drawing.Size(376, 32)
Me.label5.TabIndex = 16
Me.label5.Text = "Click on the SftBox/OCX control above and hit F1 to access help information for S" & _
"ftBox/OCX 4.5"
Me.label5.Visible = False
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.CancelButton = Me.closeButton
Me.ClientSize = New System.Drawing.Size(385, 293)
Me.Controls.Add(Me.label5)
Me.Controls.Add(Me.label4)
Me.Controls.Add(Me.label3)
Me.Controls.Add(Me.companyList)
Me.Controls.Add(Me.countryList)
Me.Controls.Add(Me.label2)
Me.Controls.Add(Me.label1)
Me.Controls.Add(Me.closeButton)
Me.Controls.Add(Me.pictureBox1)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "Form1"
Me.Text = "Softel vdm, Inc. - DataInput Sample"
CType(Me.companyList, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.countryList, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)

    End Sub

#End Region

'--locate-marker--

Private Sub closeButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles closeButton.Click
  Application.Exit()
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    ' make a bold font
    BoldFont = New Font(companyList.Font, FontStyle.Bold)
    companyList.BulkUpdate = True

    AddCompany("Softel vdm, Inc.", "", "", "1436 Kinglet Drive", "Punta Gorda", "FL", "33950", "United States", "(941) 505-8600", "(941) 505-8555")

    AddCompany("Alfreds Futterkiste", "Maria Anders", "Sales Representative", "Obere Str. 57", "Berlin", "", "12209", "Germany", "030-0074321", "030-0076545")
    AddCompany("Ana Trujillo Emparedados y helados", "Ana Trujillo", "Owner", "Avda. de la Constitución 2222", "México D.F.", "", "05021", "Mexico", "(5) 555-4729", "(5) 555-3745")
    AddCompany("Antonio Moreno Taquería", "Antonio Moreno", "Owner", "Mataderos  2312", "México D.F.", "", "05023", "Mexico", "(5) 555-3932", "")
    AddCompany("Around the Horn", "Thomas Hardy", "Sales Representative", "120 Hanover Sq.", "London", "", "WA1 1DP", "UK", "(171) 555-7788", "(171) 555-6750")
    AddCompany("Berglunds snabbköp", "Christina Berglund", "Order Administrator", "Berguvsvägen  8", "Luleå", "", "S-958 22", "Sweden", "0921-12 34 65", "0921-12 34 67")
    AddCompany("Blauer See Delikatessen", "Hanna Moos", "Sales Representative", "Forsterstr. 57", "Mannheim", "", "68306", "Germany", "0621-08460", "0621-08924")
    AddCompany("Blondel père et fils", "Frédérique Citeaux", "Marketing Manager", "24, place Kléber", "Strasbourg", "", "67000", "France", "88.60.15.31", "88.60.15.32")
    AddCompany("Bólido Comidas preparadas", "Martín Sommer", "Owner", "C/ Araquil, 67", "Madrid", "", "28023", "Spain", "(91) 555 22 82", "(91) 555 91 99")
    AddCompany("Bon app'", "Laurence Lebihan", "Owner", "12, rue des Bouchers", "Marseille", "", "13008", "France", "91.24.45.40", "91.24.45.41")
    AddCompany("Bottom-Dollar Markets", "Elizabeth Lincoln", "Accounting Manager", "23 Tsawassen Blvd.", "Tsawassen", "BC", "T2F 8M4", "Canada", "(604) 555-4729", "(604) 555-3745")
    AddCompany("B's Beverages", "Victoria Ashworth", "Sales Representative", "Fauntleroy Circus", "London", "", "EC2 5NT", "UK", "(171) 555-1212", "")
    AddCompany("Cactus Comidas para llevar", "Patricio Simpson", "Sales Agent", "Cerrito 333", "Buenos Aires", "", "1010", "Argentina", "(1) 135-5555", "(1) 135-4892")
    AddCompany("Centro comercial Moctezuma", "Francisco Chang", "Marketing Manager", "Sierras de Granada 9993", "México D.F.", "", "05022", "Mexico", "(5) 555-3392", "(5) 555-7293")
    AddCompany("Chop-suey Chinese", "Yang Wang", "Owner", "Hauptstr. 29", "Bern", "", "3012", "Switzerland", "0452-076545", "")
    AddCompany("Comércio Mineiro", "Pedro Afonso", "Sales Associate", "Av. dos Lusíadas, 23", "São Paulo", "SP", "05432-043", "Brazil", "(11) 555-7647", "")
    AddCompany("Consolidated Holdings", "Elizabeth Brown", "Sales Representative", "Berkeley Gardens 12  Brewery ", "London", "", "WX1 6LT", "UK", "(171) 555-2282", "(171) 555-9199")
    AddCompany("Drachenblut Delikatessen", "Sven Ottlieb", "Order Administrator", "Walserweg 21", "Aachen", "", "52066", "Germany", "0241-039123", "0241-059428")
    AddCompany("Du monde entier", "Janine Labrune", "Owner", "67, rue des Cinquante Otages", "Nantes", "", "44000", "France", "40.67.88.88", "40.67.89.89")
    AddCompany("Eastern Connection", "Ann Devon", "Sales Agent", "35 King George", "London", "", "WX3 6FW", "UK", "(171) 555-0297", "(171) 555-3373")
    AddCompany("Ernst Handel", "Roland Mendel", "Sales Manager", "Kirchgasse 6", "Graz", "", "8010", "Austria", "7675-3425", "7675-3426")
    AddCompany("Familia Arquibaldo", "Aria Cruz", "Marketing Assistant", "Rua Orós, 92", "São Paulo", "SP", "05442-030", "Brazil", "(11) 555-9857", "")
    AddCompany("FISSA Fabrica Inter. Salchichas S.A.", "Diego Roel", "Accounting Manager", "C/ Moralzarzal, 86", "Madrid", "", "28034", "Spain", "(91) 555 94 44", "(91) 555 55 93")
    AddCompany("Folies gourmandes", "Martine Rancé", "Assistant Sales Agent", "184, chaussée de Tournai", "Lille", "", "59000", "France", "20.16.10.16", "20.16.10.17")
    AddCompany("Folk och fä HB", "Maria Larsson", "Owner", "Åkergatan 24", "Bräcke", "", "S-844 67", "Sweden", "0695-34 67 21", "")
    AddCompany("Frankenversand", "Peter Franken", "Marketing Manager", "Berliner Platz 43", "München", "", "80805", "Germany", "089-0877310", "089-0877451")
    AddCompany("France restauration", "Carine Schmitt", "Marketing Manager", "54, rue Royale", "Nantes", "", "44000", "France", "40.32.21.21", "40.32.21.20")
    AddCompany("Franchi S.p.A.", "Paolo Accorti", "Sales Representative", "Via Monte Bianco 34", "Torino", "", "10100", "Italy", "011-4988260", "011-4988261")
    AddCompany("Furia Bacalhau e Frutos do Mar", "Lino Rodriguez ", "Sales Manager", "Jardim das rosas n. 32", "Lisboa", "", "1675", "Portugal", "(1) 354-2534", "(1) 354-2535")
    AddCompany("Galería del gastrónomo", "Eduardo Saavedra", "Marketing Manager", "Rambla de Cataluña, 23", "Barcelona", "", "08022", "Spain", "(93) 203 4560", "(93) 203 4561")
    AddCompany("Godos Cocina Típica", "José Pedro Freyre", "Sales Manager", "C/ Romero, 33", "Sevilla", "", "41101", "Spain", "(95) 555 82 82", "")
    AddCompany("Gourmet Lanchonetes", "André Fonseca", "Sales Associate", "Av. Brasil, 442", "Campinas", "SP", "04876-786", "Brazil", "(11) 555-9482", "")
    AddCompany("Great Lakes Food Market", "Howard Snyder", "Marketing Manager", "2732 Baker Blvd.", "Eugene", "OR", "97403", "United States", "(503) 555-7555", "")
    AddCompany("GROSELLA-Restaurante", "Manuel Pereira", "Owner", "5ª Ave. Los Palos Grandes", "Caracas", "DF", "1081", "Venezuela", "(2) 283-2951", "(2) 283-3397")
    AddCompany("Hanari Carnes", "Mario Pontes", "Accounting Manager", "Rua do Paço, 67", "Rio de Janeiro", "RJ", "05454-876", "Brazil", "(21) 555-0091", "(21) 555-8765")
    AddCompany("HILARIÓN-Abastos", "Carlos Hernández", "Sales Representative", "Carrera 22 con Ave. Carlos Soublette #8-35", "San Cristóbal", "Táchira", "5022", "Venezuela", "(5) 555-1340", "(5) 555-1948")
    AddCompany("Hungry Coyote Import Store", "Yoshi Latimer", "Sales Representative", "City Center Plaza 516 Main St.", "Elgin", "OR", "97827", "United States", "(503) 555-6874", "(503) 555-2376")
    AddCompany("Hungry Owl All-Night Grocers", "Patricia McKenna", "Sales Associate", "8 Johnstown Road", "Cork", "Co. Cork", "", "Ireland", "2967 542", "2967 3333")
    AddCompany("Island Trading", "Helen Bennett", "Marketing Manager", "Garden House Crowther Way", "Cowes", "Isle of Wight", "PO31 7PJ", "UK", "(198) 555-8888", "")
    AddCompany("Königlich Essen", "Philip Cramer", "Sales Associate", "Maubelstr. 90", "Brandenburg", "", "14776", "Germany", "0555-09876", "")
    AddCompany("La corne d'abondance", "Daniel Tonini", "Sales Representative", "67, avenue de l'Europe", "Versailles", "", "78000", "France", "30.59.84.10", "30.59.85.11")
    AddCompany("La maison d'Asie", "Annette Roulet", "Sales Manager", "1 rue Alsace-Lorraine", "Toulouse", "", "31000", "France", "61.77.61.10", "61.77.61.11")
    AddCompany("Laughing Bacchus Wine Cellars", "Yoshi Tannamuri", "Marketing Assistant", "1900 Oak St.", "Vancouver", "BC", "V3F 2K1", "Canada", "(604) 555-3392", "(604) 555-7293")
    AddCompany("Lazy K Kountry Store", "John Steel", "Marketing Manager", "12 Orchestra Terrace", "Walla Walla", "WA", "99362", "United States", "(509) 555-7969", "(509) 555-6221")
    AddCompany("Lehmanns Marktstand", "Renate Messner", "Sales Representative", "Magazinweg 7", "Frankfurt a.M. ", "", "60528", "Germany", "069-0245984", "069-0245874")
    AddCompany("Let's Stop N Shop", "Jaime Yorres", "Owner", "87 Polk St. Suite 5", "San Francisco", "CA", "94117", "United States", "(415) 555-5938", "")
    AddCompany("LILA-Supermercado", "Carlos González", "Accounting Manager", "Carrera 52 con Ave. Bolívar #65-98 Llano Largo", "Barquisimeto", "Lara", "3508", "Venezuela", "(9) 331-6954", "(9) 331-7256")
    AddCompany("LINO-Delicateses", "Felipe Izquierdo", "Owner", "Ave. 5 de Mayo Porlamar", "I. de Margarita", "Nueva Esparta", "4980", "Venezuela", "(8) 34-56-12", "(8) 34-93-93")
    AddCompany("Lonesome Pine Restaurant", "Fran Wilson", "Sales Manager", "89 Chiaroscuro Rd.", "Portland", "OR", "97219", "United States", "(503) 555-9573", "(503) 555-9646")
    AddCompany("Magazzini Alimentari Riuniti", "Giovanni Rovelli", "Marketing Manager", "Via Ludovico il Moro 22", "Bergamo", "", "24100", "Italy", "035-640230", "035-640231")
    AddCompany("Maison Dewey", "Catherine Dewey", "Sales Agent", "Rue Joseph-Bens 532", "Bruxelles", "", "B-1180", "Belgium", "(02) 201 24 67", "(02) 201 24 68")
    AddCompany("Mère Paillarde", "Jean Fresnière", "Marketing Assistant", "43 rue St. Laurent", "Montréal", "Québec", "H1J 1C3", "Canada", "(514) 555-8054", "(514) 555-8055")
    AddCompany("Morgenstern Gesundkost", "Alexander Feuer", "Marketing Assistant", "Heerstr. 22", "Leipzig", "", "04179", "Germany", "0342-023176", "")
    AddCompany("North/South", "Simon Crowther", "Sales Associate", "South House 300 Queensbridge", "London", "", "SW7 1RZ", "UK", "(171) 555-7733", "(171) 555-2530")
    AddCompany("Océano Atlántico Ltda.", "Yvonne Moncada", "Sales Agent", "Ing. Gustavo Moncada 8585 Piso 20-A", "Buenos Aires", "", "1010", "Argentina", "(1) 135-5333", "(1) 135-5535")
    AddCompany("Old World Delicatessen", "Rene Phillips", "Sales Representative", "2743 Bering St.", "Anchorage", "AK", "99508", "United States", "(907) 555-7584", "(907) 555-2880")
    AddCompany("Ottilies Käseladen", "Henriette Pfalzheim", "Owner", "Mehrheimerstr. 369", "Köln", "", "50739", "Germany", "0221-0644327", "0221-0765721")
    AddCompany("Paris spécialités", "Marie Bertrand", "Owner", "265, boulevard Charonne", "Paris", "", "75012", "France", "(1) 42.34.22.66", "(1) 42.34.22.77")
    AddCompany("Pericles Comidas clásicas", "Guillermo Fernández", "Sales Representative", "Calle Dr. Jorge Cash 321", "México D.F.", "", "05033", "Mexico", "(5) 552-3745", "(5) 545-3745")
    AddCompany("Piccolo und mehr", "Georg Pipps", "Sales Manager", "Geislweg 14", "Salzburg", "", "5020", "Austria", "6562-9722", "6562-9723")
    AddCompany("Princesa Isabel Vinhos", "Isabel de Castro", "Sales Representative", "Estrada da saúde n. 58", "Lisboa", "", "1756", "Portugal", "(1) 356-5634", "")
    AddCompany("Que Delícia", "Bernardo Batista", "Accounting Manager", "Rua da Panificadora, 12", "Rio de Janeiro", "RJ", "02389-673", "Brazil", "(21) 555-4252", "(21) 555-4545")
    AddCompany("Queen Cozinha", "Lúcia Carvalho", "Marketing Assistant", "Alameda dos Canàrios, 891", "São Paulo", "SP", "05487-020", "Brazil", "(11) 555-1189", "")
    AddCompany("QUICK-Stop", "Horst Kloss", "Accounting Manager", "Taucherstraße 10", "Cunewalde", "", "01307", "Germany", "0372-035188", "")
    AddCompany("Rancho grande", "Sergio Gutiérrez", "Sales Representative", "Av. del Libertador 900", "Buenos Aires", "", "1010", "Argentina", "(1) 123-5555", "(1) 123-5556")
    AddCompany("Rattlesnake Canyon Grocery", "Paula Wilson", "Assistant Sales Representative", "2817 Milton Dr.", "Albuquerque", "NM", "87110", "United States", "(505) 555-5939", "(505) 555-3620")
    AddCompany("Reggiani Caseifici", "Maurizio Moroni", "Sales Associate", "Strada Provinciale 124", "Reggio Emilia", "", "42100", "Italy", "0522-556721", "0522-556722")
    AddCompany("Ricardo Adocicados", "Janete Limeira", "Assistant Sales Agent", "Av. Copacabana, 267", "Rio de Janeiro", "RJ", "02389-890", "Brazil", "(21) 555-3412", "")
    AddCompany("Richter Supermarkt", "Michael Holz", "Sales Manager", "Grenzacherweg 237", "Genève", "", "1203", "Switzerland", "0897-034214", "")
    AddCompany("Romero y tomillo", "Alejandra Camino", "Accounting Manager", "Gran Vía, 1", "Madrid", "", "28001", "Spain", "(91) 745 6200", "(91) 745 6210")
    AddCompany("Santé Gourmet", "Jonas Bergulfsen", "Owner", "Erling Skakkes gate 78", "Stavern", "", "4110", "Norway", "07-98 92 35", "07-98 92 47")
    AddCompany("Save-a-lot Markets", "Jose Pavarotti", "Sales Representative", "187 Suffolk Ln.", "Boise", "ID", "83720", "United States", "(208) 555-8097", "")
    AddCompany("Seven Seas Imports", "Hari Kumar", "Sales Manager", "90 Wadhurst Rd.", "London", "", "OX15 4NB", "UK", "(171) 555-1717", "(171) 555-5646")
    AddCompany("Simons bistro", "Jytte Petersen", "Owner", "Vinbæltet 34", "København", "", "1734", "Denmark", "31 12 34 56", "31 13 35 57")
    AddCompany("Spécialités du monde", "Dominique Perrier", "Marketing Manager", "25, rue Lauriston", "Paris", "", "75016", "France", "(1) 47.55.60.10", "(1) 47.55.60.20")
    AddCompany("Split Rail Beer & Ale", "Art Braunschweiger", "Sales Manager", "P.O. Box 555", "Lander", "WY", "82520", "United States", "(307) 555-4680", "(307) 555-6525")
    AddCompany("Suprêmes délices", "Pascale Cartrain", "Accounting Manager", "Boulevard Tirou, 255", "Charleroi", "", "B-6000", "Belgium", "(071) 23 67 22 20", "(071) 23 67 22 21")
    AddCompany("The Big Cheese", "Liz Nixon", "Marketing Manager", "89 Jefferson Way Suite 2", "Portland", "OR", "97201", "United States", "(503) 555-3612", "")
    AddCompany("The Cracker Box", "Liu Wong", "Marketing Assistant", "55 Grizzly Peak Rd.", "Butte", "MT", "59801", "United States", "(406) 555-5834", "(406) 555-8083")
    AddCompany("Toms Spezialitäten", "Karin Josephs", "Marketing Manager", "Luisenstr. 48", "Münster", "", "44087", "Germany", "0251-031259", "0251-035695")
    AddCompany("Tortuga Restaurante", "Miguel Angel Paolino", "Owner", "Avda. Azteca 123", "México D.F.", "", "05033", "Mexico", "(5) 555-2933", "")
    AddCompany("Tradição Hipermercados", "Anabela Domingues", "Sales Representative", "Av. Inês de Castro, 414", "São Paulo", "SP", "05634-030", "Brazil", "(11) 555-2167", "(11) 555-2168")
    AddCompany("Trail's Head Gourmet Provisioners", "Helvetius Nagy", "Sales Associate", "722 DaVinci Blvd.", "Kirkland", "WA", "98034", "United States", "(206) 555-8257", "(206) 555-2174")
    AddCompany("Vaffeljernet", "Palle Ibsen", "Sales Manager", "Smagsløget 45", "Århus", "", "8200", "Denmark", "86 21 32 43", "86 22 33 44")
    AddCompany("Victuailles en stock", "Mary Saveley", "Sales Agent", "2, rue du Commerce", "Lyon", "", "69004", "France", "78.32.54.86", "78.32.54.87")
    AddCompany("Vins et alcools Chevalier", "Paul Henriot", "Accounting Manager", "59 rue de l'Abbaye", "Reims", "", "51100", "France", "26.47.15.10", "26.47.15.11")
    AddCompany("Die Wandernde Kuh", "Rita Müller", "Sales Representative", "Adenauerallee 900", "Stuttgart", "", "70563", "Germany", "0711-020361", "0711-035428")
    AddCompany("Wartian Herkku", "Pirkko Koskitalo", "Accounting Manager", "Torikatu 38", "Oulu", "", "90110", "Finland", "981-443655", "981-443655")
    AddCompany("Wellington Importadora", "Paula Parente", "Sales Manager", "Rua do Mercado, 12", "Resende", "SP", "08737-363", "Brazil", "(14) 555-8122", "")
    AddCompany("White Clover Markets", "Karl Jablonski", "Owner", "305 - 14th Ave. S. Suite 3B", "Seattle", "WA", "98128", "United States", "(206) 555-4112", "(206) 555-4115")
    AddCompany("Wilman Kala", "Matti Karttunen", "Owner/Marketing Assistant", "Keskuskatu 45", "Helsinki", "", "21240", "Finland", "90-224 8858", "90-224 8858")
    AddCompany("Wolski  Zajazd", "Zbyszek Piestrzeniewicz", "Owner", "ul. Filtrowa 68", "Warszawa", "", "01-012", "Poland", "(26) 642-7012", "(26) 642-7012")
    companyList.BulkUpdate = False

    companyList.Columns.MakeOptimal(0)
    companyList.Items.RecalcHorizontalExtent(0)
    PerformSort(0, SftBoxSortConstants.sortSftBoxAscending)
    ' Adjust horizontal extent so we can scroll to the right edge of the header
    companyList.Items.HorizontalExtent = companyList.Items.HorizontalExtent + companyList.Width
    companyList.Items.Select("Softel vdm, Inc.", 0, 0, False, True, False)


    countryList.Items.Add("Austria")
    countryList.Items.Add("Australia")
    countryList.Items.Add("Belgium")
    countryList.Items.Add("Canada")
    countryList.Items.Add("Switzerland")
    countryList.Items.Add("Chile")
    countryList.Items.Add("China")
    countryList.Items.Add("Costa Rica")
    countryList.Items.Add("Cuba")
    countryList.Items.Add("Germany")
    countryList.Items.Add("Denmark")
    countryList.Items.Add("Egypt")
    countryList.Items.Add("Spain")
    countryList.Items.Add("Finland")
    countryList.Items.Add("France")
    countryList.Items.Add("Great Britain")
    countryList.Items.Add("Greenland")
    countryList.Items.Add("Greece")
    countryList.Items.Add("Hong Kong")
    countryList.Items.Add("Ireland")
    countryList.Items.Add("Israel")
    countryList.Items.Add("Iceland")
    countryList.Items.Add("Italy")
    countryList.Items.Add("Japan")
    countryList.Items.Add("South Korea")
    countryList.Items.Add("Liechtenstein")
    countryList.Items.Add("Lithuania")
    countryList.Items.Add("Luxembourg")
    countryList.Items.Add("Mexico")
    countryList.Items.Add("Netherlands")
    countryList.Items.Add("The Netherlands")
    countryList.Items.Add("Norway")
    countryList.Items.Add("New Zealand")
    countryList.Items.Add("Puerto Rico")
    countryList.Items.Add("Portugal")
    countryList.Items.Add("Russia")
    countryList.Items.Add("Sweden")
    countryList.Items.Add("Singapore")
    countryList.Items.Add("United Kingdom")
    countryList.Items.Add("Yugoslavia")
    countryList.Items.Add("South Africa")
    countryList.Items.Sort(-1, 0, SftBoxSortConstants.sortSftBoxAscending)
    countryList.Items.Insert("United States", 0)
    countryList.Items.Selection = 0

    countryList.Columns.MakeOptimal(0)
    countryList.Items.RecalcHorizontalExtent(0)
End Sub

Private Sub AddCompany(ByVal CompName As String, ByVal NotUsed1 As String, ByVal NotUsed2 As String, ByVal Address As String, ByVal City As String, ByVal State As String, ByVal ZIP As String, ByVal Country As String, ByVal Phone As String, ByVal Fax As String)
    Dim index As Integer
    index = companyList.Items.Add(CompName)
    If Country = "United States" Then
        companyList.get_Cell(index, 0).let_Font(OLECvt.ToIFontDisp(BoldFont))
        companyList.get_Cell(index, 0).Image.NETImageObject = pictureBox1.Image
        companyList.get_Cell(index, 0).ImageHAlign = SftBoxHAlignConstants.halignSftBoxRight
    End If
    companyList.get_Cell(index, 1).Text = Address
    companyList.get_Cell(index, 2).Text = City
    companyList.get_Cell(index, 3).Text = State
    companyList.get_Cell(index, 4).Text = ZIP
    companyList.get_Cell(index, 5).Text = Country
    companyList.get_Cell(index, 6).Text = Phone
    companyList.get_Cell(index, 7).Text = Fax
End Sub

Private Sub PerformSort(ByVal column As Short, ByVal dir As SftBoxSortConstants)
    sortDirection = dir
    sortedColumn = column
    companyList.Headers.ClearImages()
    If sortDirection = SftBoxSortConstants.sortSftBoxAscending Then
        companyList.get_Header(column).Image.Appearance = SftPictureImageConstants.sftImageSortAsc
    Else
        companyList.get_Header(column).Image.Appearance = SftPictureImageConstants.sftImageSortDesc
    End If
    companyList.Items.Sort(-1, sortedColumn, sortDirection)
End Sub

Private Sub companyList_ItemClick(ByVal sender As Object, ByVal e As AxSftBoxLib45._ISftBoxEvents_ItemClickEvent) Handles companyList.ItemClick
    If e.areaType = SftBoxAreaConstants.areaSftBoxColumn Then
        If sortedColumn <> e.colNum Or sortDirection <> SftBoxSortConstants.sortSftBoxAscending Then
            PerformSort(e.colNum, SftBoxSortConstants.sortSftBoxAscending)
        Else
            PerformSort(e.colNum, SftBoxSortConstants.sortSftBoxDescending)
        End If
    End If
End Sub

Private Sub companyList_ItemDblClk(ByVal sender As Object, ByVal e As AxSftBoxLib45._ISftBoxEvents_ItemDblClkEvent) Handles companyList.ItemDblClk
    If e.areaType = SftBoxAreaConstants.areaSftBoxColumn Then
        If sortedColumn <> e.colNum Or sortDirection <> SftBoxSortConstants.sortSftBoxAscending Then
            PerformSort(e.colNum, SftBoxSortConstants.sortSftBoxAscending)
        Else
            PerformSort(e.colNum, SftBoxSortConstants.sortSftBoxDescending)
        End If
    ElseIf e.areaType = SftBoxAreaConstants.areaSftBoxColumnRes Then
        companyList.get_Column(e.colNum).MakeOptimal(0)
        companyList.Items.RecalcHorizontalExtent(0)
        ' Adjust horizontal extent so we can scroll to the right edge of the header
        companyList.Items.HorizontalExtent = companyList.Items.HorizontalExtent + companyList.Width
    End If
End Sub

End Class