D
DM
Hello.
Could some explain what's wrong with this app - it hangs when I hit one
of arrows of VScrollBar.
using System;
using System.Data;
using System.Windows.Forms;
namespace VScrollBar
{
class Class1 : System.Windows.Forms.Form
{
System.Windows.Forms.VScrollBar scrollBar;
Class1()
{
scrollBar = new System.Windows.Forms.VScrollBar();
scrollBar.Maximum = -100;
scrollBar.Minimum = 100;
scrollBar.SmallChange = 1;
scrollBar.LargeChange = 2;
scrollBar.Value = 0;
scrollBar.ValueChanged += new EventHandler(scrollBar_ValueChanged);
scrollBar.Location = new System.Drawing.Point(100,100);
scrollBar.Size = new System.Drawing.Size(20,40);
Controls.Add(scrollBar);
}
void scrollBar_ValueChanged(object sender, EventArgs e)
{
MessageBox.Show("" + scrollBar.Value);
}
static void Main(string[] args)
{
Application.Run( new Class1() );
}
}
}
Thanks for any help.
Could some explain what's wrong with this app - it hangs when I hit one
of arrows of VScrollBar.
using System;
using System.Data;
using System.Windows.Forms;
namespace VScrollBar
{
class Class1 : System.Windows.Forms.Form
{
System.Windows.Forms.VScrollBar scrollBar;
Class1()
{
scrollBar = new System.Windows.Forms.VScrollBar();
scrollBar.Maximum = -100;
scrollBar.Minimum = 100;
scrollBar.SmallChange = 1;
scrollBar.LargeChange = 2;
scrollBar.Value = 0;
scrollBar.ValueChanged += new EventHandler(scrollBar_ValueChanged);
scrollBar.Location = new System.Drawing.Point(100,100);
scrollBar.Size = new System.Drawing.Size(20,40);
Controls.Add(scrollBar);
}
void scrollBar_ValueChanged(object sender, EventArgs e)
{
MessageBox.Show("" + scrollBar.Value);
}
static void Main(string[] args)
{
Application.Run( new Class1() );
}
}
}
Thanks for any help.