Auto Scroll Form : Form « GUI « VB.Net Tutorial

VB.Net Tutorial
1. Language Basics
2. Data Type
3. Operator
4. Statements
5. Date Time
6. Class Module
7. Development
8. Collections
9. Generics
10. Attributes
11. Event
12. Stream File
13. GUI
14. GUI Applications
15. 2D Graphics
16. I18N Internationlization
17. Reflection
18. Regular Expressions
19. Security
20. Socket Network
21. Thread
22. Windows
23. XML
24. Database ADO.net
25. Design Patterns
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial » GUI » Form 
13. 48. 11. Auto Scroll Form
Auto Scroll Form
 

Imports System.Windows.Forms

public class AutoScroll
   public Shared Sub Main
        Application.Run(New AutoScrollExample)
   End Sub
End class

Public Class AutoScrollExample
    Inherits System.Windows.Forms.Form

#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 NothingThen
                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 TextBox1 As System.Windows.Forms.TextBox
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
    Friend WithEvents RadioButton1 As System.Windows.Forms.RadioButton
    Friend WithEvents RadioButton2 As System.Windows.Forms.RadioButton
    Friend WithEvents RadioButton3 As System.Windows.Forms.RadioButton
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents TextBox4 As System.Windows.Forms.TextBox
    Friend WithEvents DateTimePicker1 As System.Windows.Forms.DateTimePicker
    Friend WithEvents Label5 As System.Windows.Forms.Label
    Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox
    Friend WithEvents Label6 As System.Windows.Forms.Label
    Friend WithEvents Label7 As System.Windows.Forms.Label
    Friend WithEvents TextBox5 As System.Windows.Forms.TextBox
    Friend WithEvents Label8 As System.Windows.Forms.Label
    Friend WithEvents TextBox6 As System.Windows.Forms.TextBox
    Friend WithEvents Label9 As System.Windows.Forms.Label
    Friend WithEvents TextBox7 As System.Windows.Forms.TextBox
    Friend WithEvents Label10 As System.Windows.Forms.Label
    Friend WithEvents TextBox8 As System.Windows.Forms.TextBox
    Friend WithEvents Button1 As System.Windows.Forms.Button
    Friend WithEvents Button2 As System.Windows.Forms.Button
    <System.Diagnostics.DebuggerStepThrough()Private Sub InitializeComponent()
        Me.TextBox1 = New System.Windows.Forms.TextBox
        Me.Label1 = New System.Windows.Forms.Label
        Me.Label2 = New System.Windows.Forms.Label
        Me.TextBox2 = New System.Windows.Forms.TextBox
        Me.GroupBox1 = New System.Windows.Forms.GroupBox
        Me.RadioButton1 = New System.Windows.Forms.RadioButton
        Me.RadioButton2 = New System.Windows.Forms.RadioButton
        Me.RadioButton3 = New System.Windows.Forms.RadioButton
        Me.Label3 = New System.Windows.Forms.Label
        Me.TextBox3 = New System.Windows.Forms.TextBox
        Me.Label4 = New System.Windows.Forms.Label
        Me.TextBox4 = New System.Windows.Forms.TextBox
        Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker
        Me.Label5 = New System.Windows.Forms.Label
        Me.ComboBox1 = New System.Windows.Forms.ComboBox
        Me.Label6 = New System.Windows.Forms.Label
        Me.Label7 = New System.Windows.Forms.Label
        Me.TextBox5 = New System.Windows.Forms.TextBox
        Me.Label8 = New System.Windows.Forms.Label
        Me.TextBox6 = New System.Windows.Forms.TextBox
        Me.Label9 = New System.Windows.Forms.Label
        Me.TextBox7 = New System.Windows.Forms.TextBox
        Me.Label10 = New System.Windows.Forms.Label
        Me.TextBox8 = New System.Windows.Forms.TextBox
        Me.Button1 = New System.Windows.Forms.Button
        Me.Button2 = New System.Windows.Forms.Button
        Me.GroupBox1.SuspendLayout()
        Me.SuspendLayout()
        '
        'TextBox1
        '
        Me.TextBox1.Location = New System.Drawing.Point(1632)
        Me.TextBox1.Name = "TextBox1"
        Me.TextBox1.TabIndex = 0
        Me.TextBox1.Text = ""
        '
        'Label1
        '
        Me.Label1.AutoSize = True
        Me.Label1.Location = New System.Drawing.Point(88)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(6316)
        Me.Label1.TabIndex = 1
        Me.Label1.Text = "First Name:"
        '
        'Label2
        '
        Me.Label2.AutoSize = True
        Me.Label2.Location = New System.Drawing.Point(1208)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(6216)
        Me.Label2.TabIndex = 3
        Me.Label2.Text = "Last Name:"
        '
        'TextBox2
        '
        Me.TextBox2.Location = New System.Drawing.Point(12832)
        Me.TextBox2.Name = "TextBox2"
        Me.TextBox2.Size = New System.Drawing.Size(25620)
        Me.TextBox2.TabIndex = 2
        Me.TextBox2.Text = ""
        '
        'GroupBox1
        '
        Me.GroupBox1.Controls.Add(Me.RadioButton3)
        Me.GroupBox1.Controls.Add(Me.RadioButton2)
        Me.GroupBox1.Controls.Add(Me.RadioButton1)
        Me.GroupBox1.Location = New System.Drawing.Point(24064)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(144128)
        Me.GroupBox1.TabIndex = 4
        Me.GroupBox1.TabStop = False
        Me.GroupBox1.Text = "Style"
        '
        'RadioButton1
        '
        Me.RadioButton1.Location = New System.Drawing.Point(3224)
        Me.RadioButton1.Name = "RadioButton1"
        Me.RadioButton1.TabIndex = 0
        Me.RadioButton1.Text = "S4 -- Blue"
        '
        'RadioButton2
        '
        Me.RadioButton2.Location = New System.Drawing.Point(3256)
        Me.RadioButton2.Name = "RadioButton2"
        Me.RadioButton2.TabIndex = 1
        Me.RadioButton2.Text = "S2 -- White"
        '
        'RadioButton3
        '
        Me.RadioButton3.Location = New System.Drawing.Point(3288)
        Me.RadioButton3.Name = "RadioButton3"
        Me.RadioButton3.TabIndex = 2
        Me.RadioButton3.Text = "S0 -- Black"
        '
        'Label3
        '
        Me.Label3.AutoSize = True
        Me.Label3.Location = New System.Drawing.Point(858)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(3316)
        Me.Label3.TabIndex = 6
        Me.Label3.Text = "Zone:"
        '
        'TextBox3
        '
        Me.TextBox3.Location = New System.Drawing.Point(4856)
        Me.TextBox3.Name = "TextBox3"
        Me.TextBox3.Size = New System.Drawing.Size(18420)
        Me.TextBox3.TabIndex = 5
        Me.TextBox3.Text = ""
        '
        'Label4
        '
        Me.Label4.AutoSize = True
        Me.Label4.Location = New System.Drawing.Point(890)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(9616)
        Me.Label4.TabIndex = 8
        Me.Label4.Text = "City of Residence:"
        '
        'TextBox4
        '
        Me.TextBox4.Location = New System.Drawing.Point(10488)
        Me.TextBox4.Name = "TextBox4"
        Me.TextBox4.Size = New System.Drawing.Size(12820)
        Me.TextBox4.TabIndex = 7
        Me.TextBox4.Text = ""
        '
        'DateTimePicker1
        '
        Me.DateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Short
        Me.DateTimePicker1.Location = New System.Drawing.Point(104112)
        Me.DateTimePicker1.Name = "DateTimePicker1"
        Me.DateTimePicker1.Size = New System.Drawing.Size(12820)
        Me.DateTimePicker1.TabIndex = 9
        '
        'Label5
        '
        Me.Label5.AutoSize = True
        Me.Label5.Location = New System.Drawing.Point(8114)
        Me.Label5.Name = "Label5"
        Me.Label5.Size = New System.Drawing.Size(9016)
        Me.Label5.TabIndex = 10
        Me.Label5.Text = "Residence Entry:"
        '
        'ComboBox1
        '
        Me.ComboBox1.Location = New System.Drawing.Point(64136)
        Me.ComboBox1.Name = "ComboBox1"
        Me.ComboBox1.Size = New System.Drawing.Size(16821)
        Me.ComboBox1.TabIndex = 11
        Me.ComboBox1.Text = "State"
        '
        'Label6
        '
        Me.Label6.AutoSize = True
        Me.Label6.Location = New System.Drawing.Point(8138)
        Me.Label6.Name = "Label6"
        Me.Label6.Size = New System.Drawing.Size(4516)
        Me.Label6.TabIndex = 12
        Me.Label6.Text = "System:"
        '
        'Label7
        '
        Me.Label7.AutoSize = True
        Me.Label7.Location = New System.Drawing.Point(8170)
        Me.Label7.Name = "Label7"
        Me.Label7.Size = New System.Drawing.Size(6216)
        Me.Label7.TabIndex = 14
        Me.Label7.Text = "Field Code:"
        '
        'TextBox5
        '
        Me.TextBox5.Location = New System.Drawing.Point(72168)
        Me.TextBox5.Name = "TextBox5"
        Me.TextBox5.Size = New System.Drawing.Size(16020)
        Me.TextBox5.TabIndex = 13
        Me.TextBox5.Text = ""
        '
        'Label8
        '
        Me.Label8.AutoSize = True
        Me.Label8.Location = New System.Drawing.Point(8202)
        Me.Label8.Name = "Label8"
        Me.Label8.Size = New System.Drawing.Size(4416)
        Me.Label8.TabIndex = 16
        Me.Label8.Text = "Code 1:"
        '
        'TextBox6
        '
        Me.TextBox6.Location = New System.Drawing.Point(56200)
        Me.TextBox6.Name = "TextBox6"
        Me.TextBox6.Size = New System.Drawing.Size(32820)
        Me.TextBox6.TabIndex = 15
        Me.TextBox6.Text = ""
        '
        'Label9
        '
        Me.Label9.AutoSize = True
        Me.Label9.Location = New System.Drawing.Point(8226)
        Me.Label9.Name = "Label9"
        Me.Label9.Size = New System.Drawing.Size(4416)
        Me.Label9.TabIndex = 18
        Me.Label9.Text = "Code 2:"
        '
        'TextBox7
        '
        Me.TextBox7.Location = New System.Drawing.Point(56224)
        Me.TextBox7.Name = "TextBox7"
        Me.TextBox7.Size = New System.Drawing.Size(32820)
        Me.TextBox7.TabIndex = 17
        Me.TextBox7.Text = ""
        '
        'Label10
        '
        Me.Label10.AutoSize = True
        Me.Label10.Location = New System.Drawing.Point(8250)
        Me.Label10.Name = "Label10"
        Me.Label10.Size = New System.Drawing.Size(4416)
        Me.Label10.TabIndex = 20
        Me.Label10.Text = "Code 3:"
        '
        'TextBox8
        '
        Me.TextBox8.Location = New System.Drawing.Point(56248)
        Me.TextBox8.Name = "TextBox8"
        Me.TextBox8.Size = New System.Drawing.Size(32820)
        Me.TextBox8.TabIndex = 19
        Me.TextBox8.Text = ""
        '
        'Button1
        '
        Me.Button1.Location = New System.Drawing.Point(232280)
        Me.Button1.Name = "Button1"
        Me.Button1.TabIndex = 21
        Me.Button1.Text = "OK"
        '
        'Button2
        '
        Me.Button2.Location = New System.Drawing.Point(312280)
        Me.Button2.Name = "Button2"
        Me.Button2.TabIndex = 22
        Me.Button2.Text = "Cancel"
        '
        'AutoScrollExample
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(513)
        Me.AutoScroll = True
        Me.ClientSize = New System.Drawing.Size(392310)
        Me.Controls.Add(Me.Button2)
        Me.Controls.Add(Me.Button1)
        Me.Controls.Add(Me.Label10)
        Me.Controls.Add(Me.TextBox8)
        Me.Controls.Add(Me.Label9)
        Me.Controls.Add(Me.TextBox7)
        Me.Controls.Add(Me.Label8)
        Me.Controls.Add(Me.TextBox6)
        Me.Controls.Add(Me.Label7)
        Me.Controls.Add(Me.TextBox5)
        Me.Controls.Add(Me.Label6)
        Me.Controls.Add(Me.ComboBox1)
        Me.Controls.Add(Me.Label5)
        Me.Controls.Add(Me.DateTimePicker1)
        Me.Controls.Add(Me.Label4)
        Me.Controls.Add(Me.TextBox4)
        Me.Controls.Add(Me.Label3)
        Me.Controls.Add(Me.TextBox3)
        Me.Controls.Add(Me.GroupBox1)
        Me.Controls.Add(Me.Label2)
        Me.Controls.Add(Me.TextBox2)
        Me.Controls.Add(Me.Label1)
        Me.Controls.Add(Me.TextBox1)
        Me.Name = "AutoScrollExample"
        Me.Text = "AutoScrollExample"
        Me.GroupBox1.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub

#End Region

End Class

        
13. 48. Form
13. 48. 1. Create Form window by hand
13. 48. 2. Add control to Form dynamicallyAdd control to Form dynamically
13. 48. 3. Set Form IconSet Form Icon
13. 48. 4. Form Fade outForm Fade out
13. 48. 5. Border Less formBorder Less form
13. 48. 6. Owner draw form
13. 48. 7. Build Form hierarchicallyBuild Form hierarchically
13. 48. 8. Form InheritanceForm Inheritance
13. 48. 9. SendKeysSendKeys
13. 48. 10. Form: show, hide and get data fromForm: show, hide and get data from
13. 48. 11. Auto Scroll FormAuto Scroll Form
w_w__w_.j__a__v___a__2___s___._co_m__ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.