HScrollBar クラス
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _ <ComVisibleAttribute(True)> _ Public Class HScrollBar Inherits ScrollBar
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)] [ComVisibleAttribute(true)] public class HScrollBar : ScrollBar
[ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)] [ComVisibleAttribute(true)] public ref class HScrollBar : public ScrollBar

スクロール バーが必要な多くのコントロールには、既にスクロール バーが付いているため、このコントロールは必要ありません。スクロール バーが付いているコントロールには、複数行 TextBox コントロール、ListBox、ComboBox などがあります。
このコントロールを使用して、PictureBox などの固有のスクロール バーが付いていないコンテナや、数値データのユーザー入力にスクロール機能を実装できます。数値データは、コントロールに表示したり、コードで利用したりできます。Minimum プロパティおよび Maximum プロパティは、ユーザーが選択できる値の範囲を決定します。LargeChange プロパティは、スクロール ボックスの外側でスクロール バーの内側をクリックするときの効果を決定します。SmallChange プロパティは、コントロールの各終端でスクロール バーの矢印ボタンをクリックするときの効果を決定します。

HScrollBar を作成および初期化し、Form に追加する例を次に示します。
Private Sub InitializeMyScrollBar() ' Create and initialize an HScrollBar. Dim hScrollBar1 As New HScrollBar() ' Dock the scroll bar to the bottom of the form. hScrollBar1.Dock = DockStyle.Bottom ' Add the scroll bar to the form. Controls.Add(hScrollBar1) End Sub 'InitializeMyScrollBar
private void InitializeMyScrollBar() { // Create and initialize an HScrollBar. HScrollBar hScrollBar1 = new HScrollBar(); // Dock the scroll bar to the bottom of the form. hScrollBar1.Dock = DockStyle.Bottom; // Add the scroll bar to the form. Controls.Add(hScrollBar1); }
private: void InitializeMyScrollBar() { // Create and initialize an HScrollBar. HScrollBar^ hScrollBar1 = gcnew HScrollBar; // Dock the scroll bar to the bottom of the form. hScrollBar1->Dock = DockStyle::Bottom; // Add the scroll bar to the form. Controls->Add( hScrollBar1 ); }
private void InitializeMyScrollBar() { // Create and initialize an HScrollBar. HScrollBar hScrollBar1 = new HScrollBar(); // Dock the scroll bar to the bottom of the form. hScrollBar1.set_Dock(DockStyle.Bottom); // Add the scroll bar to the form. get_Controls().Add(hScrollBar1); } //InitializeMyScrollBar
function InitializeMyScrollBar(){ // Create and initialize an HScrollBar. var hScrollBar1 : HScrollBar = new HScrollBar() // Dock the scroll bar to the bottom of the form. hScrollBar1.Dock = DockStyle.Bottom // Add the scroll bar to the form. Controls.Add(hScrollBar1) }

System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.Control
System.Windows.Forms.ScrollBar
System.Windows.Forms.HScrollBar


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- HScrollBar クラスのページへのリンク