Click here to Skip to main content
15,896,201 members
Articles / Programming Languages / Visual Basic

Creating a Filtered List of Customers on a Mobile Device

29 Feb 2008CPOL7 min read 31.9K   184   10  
Creating a list of customers is very common task when creating business applications. Article demonstrates how simple it is to create a mobile application using Resco MobileForms Toolkit that shows a list of customers with search capabilities and professional look.

This article is in the Product Showcase section for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers.

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Public Class Form1
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing AndAlso components IsNot Nothing Then
            components.Dispose()
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer
    private mainMenu1 As System.Windows.Forms.MainMenu

    '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.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Dim RowTemplate1 As Resco.Controls.AdvancedList.RowTemplate = New Resco.Controls.AdvancedList.RowTemplate
        Dim TextCell1 As Resco.Controls.AdvancedList.TextCell = New Resco.Controls.AdvancedList.TextCell
        Dim GradientColor1 As Resco.Controls.AdvancedList.GradientColor = New Resco.Controls.AdvancedList.GradientColor
        Dim RowTemplate2 As Resco.Controls.AdvancedList.RowTemplate = New Resco.Controls.AdvancedList.RowTemplate
        Dim TextCell2 As Resco.Controls.AdvancedList.TextCell = New Resco.Controls.AdvancedList.TextCell
        Dim TextCell3 As Resco.Controls.AdvancedList.TextCell = New Resco.Controls.AdvancedList.TextCell
        Dim TextCell4 As Resco.Controls.AdvancedList.TextCell = New Resco.Controls.AdvancedList.TextCell
        Dim TextCell5 As Resco.Controls.AdvancedList.TextCell = New Resco.Controls.AdvancedList.TextCell
        Dim GradientColor2 As Resco.Controls.AdvancedList.GradientColor = New Resco.Controls.AdvancedList.GradientColor
        Me.mainMenu1 = New System.Windows.Forms.MainMenu
        Me.mnuRows = New System.Windows.Forms.MenuItem
        Me.mnuSimple = New System.Windows.Forms.MenuItem
        Me.mnuDetailed = New System.Windows.Forms.MenuItem
        Me.advancedList1 = New Resco.Controls.AdvancedList.AdvancedList
        Me.TextBox1 = New System.Windows.Forms.TextBox
        Me.SuspendLayout()
        '
        'mainMenu1
        '
        Me.mainMenu1.MenuItems.Add(Me.mnuRows)
        '
        'mnuRows
        '
        Me.mnuRows.MenuItems.Add(Me.mnuSimple)
        Me.mnuRows.MenuItems.Add(Me.mnuDetailed)
        Me.mnuRows.Text = "Rows"
        '
        'mnuSimple
        '
        Me.mnuSimple.Text = "Show simple rows"
        '
        'mnuDetailed
        '
        Me.mnuDetailed.Text = "Show detailed rows"
        '
        'advancedList1
        '
        Me.advancedList1.DelayLoad = True
        Me.advancedList1.GradientBackColor = New Resco.Controls.AdvancedList.GradientColor(System.Drawing.Color.White, System.Drawing.Color.SkyBlue, Resco.Controls.AdvancedList.FillDirection.Horizontal)
        Me.advancedList1.KeyNavigation = True
        Me.advancedList1.Location = New System.Drawing.Point(3, 30)
        Me.advancedList1.Name = "advancedList1"
        Me.advancedList1.SelectedTemplateIndex = 1
        Me.advancedList1.Size = New System.Drawing.Size(234, 235)
        Me.advancedList1.TabIndex = 0
        TextCell1.Bounds = New System.Drawing.Rectangle(0, 0, -1, 16)
        TextCell1.CellSource.ColumnName = "ContactName"
        TextCell1.Name = "ContactName"
        TextCell1.TextFont = New System.Drawing.Font("Tahoma", 8.0!, System.Drawing.FontStyle.Bold)
        RowTemplate1.CellTemplates.Add(TextCell1)
        GradientColor1.EndColor = System.Drawing.Color.SkyBlue
        GradientColor1.FillDirection = Resco.Controls.AdvancedList.FillDirection.Horizontal
        RowTemplate1.GradientBackColor = GradientColor1
        RowTemplate1.Name = "Simple"
        RowTemplate1.UseGradient = True
        RowTemplate2.BackColor = System.Drawing.SystemColors.Highlight
        TextCell2.Bounds = New System.Drawing.Rectangle(0, 0, -1, 16)
        TextCell2.CellSource.ColumnName = "ContactName"
        TextCell2.Name = "ContactName"
        TextCell2.SelectedBackColor = System.Drawing.SystemColors.HighlightText
        TextCell2.SelectedForeColor = System.Drawing.SystemColors.Highlight
        TextCell2.TextFont = New System.Drawing.Font("Tahoma", 8.0!, System.Drawing.FontStyle.Bold)
        TextCell3.Bounds = New System.Drawing.Rectangle(0, 16, 100, 16)
        TextCell3.CellSource.ColumnName = "Address"
        TextCell3.Name = "Address"
        TextCell3.TextFont = New System.Drawing.Font("Tahoma", 8.0!, System.Drawing.FontStyle.Bold)
        TextCell4.Bounds = New System.Drawing.Rectangle(100, 16, -1, 16)
        TextCell4.CellSource.ColumnName = "City"
        TextCell4.Name = "City"
        TextCell4.TextFont = New System.Drawing.Font("Tahoma", 8.0!, System.Drawing.FontStyle.Bold)
        TextCell5.Bounds = New System.Drawing.Rectangle(0, 32, -1, 16)
        TextCell5.CellSource.ColumnName = "Country"
        TextCell5.Name = "Country"
        TextCell5.TextFont = New System.Drawing.Font("Tahoma", 8.0!, System.Drawing.FontStyle.Bold)
        RowTemplate2.CellTemplates.Add(TextCell2)
        RowTemplate2.CellTemplates.Add(TextCell3)
        RowTemplate2.CellTemplates.Add(TextCell4)
        RowTemplate2.CellTemplates.Add(TextCell5)
        RowTemplate2.ForeColor = System.Drawing.SystemColors.HighlightText
        GradientColor2.EndColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(160, Byte), Integer), CType(CType(160, Byte), Integer))
        GradientColor2.StartColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(100, Byte), Integer), CType(CType(100, Byte), Integer))
        RowTemplate2.GradientBackColor = GradientColor2
        RowTemplate2.Height = 48
        RowTemplate2.Name = "Selected"
        RowTemplate2.UseGradient = True
        Me.advancedList1.Templates.Add(RowTemplate1)
        Me.advancedList1.Templates.Add(RowTemplate2)
        Me.advancedList1.UseGradient = True
        '
        'TextBox1
        '
        Me.TextBox1.Location = New System.Drawing.Point(3, 3)
        Me.TextBox1.Name = "TextBox1"
        Me.TextBox1.Size = New System.Drawing.Size(234, 21)
        Me.TextBox1.TabIndex = 1
        '
        'Form1
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi
        Me.AutoScroll = True
        Me.ClientSize = New System.Drawing.Size(240, 268)
        Me.Controls.Add(Me.TextBox1)
        Me.Controls.Add(Me.advancedList1)
        Me.Menu = Me.mainMenu1
        Me.MinimizeBox = False
        Me.Name = "Form1"
        Me.Text = "Form1"
        Me.ResumeLayout(False)

    End Sub
    Friend WithEvents advancedList1 As Resco.Controls.AdvancedList.AdvancedList
    Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
    Friend WithEvents mnuRows As System.Windows.Forms.MenuItem
    Friend WithEvents mnuSimple As System.Windows.Forms.MenuItem
    Friend WithEvents mnuDetailed As System.Windows.Forms.MenuItem

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Slovakia Slovakia
Resco is a leading developer of wide range of mobile software products for the Microsoft Windows Mobile software platform. Besides the best selling end-user mobile applications, Resco offers also powerful developer controls and tools as well as enterprise mobile solutions.

For further information about Resco MobileForms Toolkit, visit www.resco.net/developer/mobileformstoolkit/

For further information abour Resco, visit www.resco.net.

Comments and Discussions