Get HScrollBar Value : ScrollBar « GUI « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Development
8.Event
9.File Directory
10.Generics
11.GUI
12.Language Basics
13.LINQ
14.Network Remote
15.Security
16.Thread
17.Windows Presentation Foundation
18.Windows System
19.XML
20.XML LINQ
VB.Net Tutorial
VB.Net by API
VB.Net » GUI » ScrollBarScreenshots 
Get HScrollBar Value
Get HScrollBar Value

Imports System
Imports System.Windows.Forms
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Drawing.Text
Imports System.Drawing.Imaging

Public Class MainClass

  Shared Sub Main()
     Dim form1 As Form1 = new Form1
     Application.Run(form1)
  End Sub
  
End Class




Public Class Form1
  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()

    AlphaScroll.Minimum = 20
    AlphaScroll.Maximum = 245
    AlphaScroll.SmallChange = 5
    AlphaScroll.LargeChange = 5

    GammaScroll.Minimum = 1
    GammaScroll.Maximum = 50
    GammaScroll.SmallChange = 1
    GammaScroll.LargeChange = 5


  End Sub

  Friend WithEvents GammaScroll As System.Windows.Forms.HScrollBar
  Friend WithEvents AlphaScroll As System.Windows.Forms.HScrollBar

  '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.
  <System.Diagnostics.DebuggerStepThrough()Private Sub InitializeComponent()
    Me.GammaScroll = New System.Windows.Forms.HScrollBar()
    Me.AlphaScroll = New System.Windows.Forms.HScrollBar()
    Me.SuspendLayout()
    '
    'GammaScroll
    '
    Me.GammaScroll.Location = New System.Drawing.Point(3224)
    Me.GammaScroll.Name = "GammaScroll"
    Me.GammaScroll.Size = New System.Drawing.Size(9616)
    Me.GammaScroll.TabIndex = 0
    '
    'AlphaScroll
    '
    Me.AlphaScroll.Location = New System.Drawing.Point(32136)
    Me.AlphaScroll.Name = "AlphaScroll"
    Me.AlphaScroll.Size = New System.Drawing.Size(9616)
    Me.AlphaScroll.TabIndex = 1
    '
    'Form1
    '
    Me.AutoScaleBaseSize = New System.Drawing.Size(513)
    Me.ClientSize = New System.Drawing.Size(292273)
    Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.AlphaScroll, Me.GammaScroll})
    Me.Name = "Form1"
    Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
    Me.Text = "Form1"
    Me.ResumeLayout(False)

  End Sub

#End Region


  Private Sub Form1_Load(ByVal sender As System.Object, _
                         ByVal e As System.EventArgs_
                         Handles MyBase.Load

  End Sub

  Private Sub GammaScroll_Scroll(ByVal sender As System.Object, _
                          ByVal e As System.Windows.Forms.ScrollEventArgs_
                          Handles GammaScroll.Scroll
    
    Console.WriteLineCType(GammaScroll.Value / 10, Single) )

  End Sub

  Private Sub AlphaScroll_Scroll(ByVal sender As System.Object, _
                          ByVal e As System.Windows.Forms.ScrollEventArgs_
                          Handles AlphaScroll.Scroll
    Console.WriteLineAlphaScroll.Value )

  End Sub
End Class

           
       
Related examples in the same category
1.Get Value from Vertical Scroll BarGet Value from Vertical Scroll Bar
2.Use Scroll Bar to set rotate, X position and repaintUse Scroll Bar to set rotate, X position and repaint
3.ScrollBar Demo: get valueScrollBar Demo: get value
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.