Question scrollbar in my windows form ?

IT Student

New member
Joined
Aug 12, 2009
Messages
2
Programming Experience
Beginner
Hi
How can I add a scrollbar to my form I tried the auto scrollbar option but is not working ??

Q2

How can I validate the user inpute inside a textbox to check that he type the desired word??
for Example validate if the user typed the word ( Bob)??!!

Thanks
 
youve asked this in VBForums already

to add a scrollbar depends a vertical or horizontal?

you can just get the hScrollBar or VScrollBar from the toolbox,

to validate wether a user has inputted something, you can use a button for this

add a button to the control and name it ValidateUser or w.e
if your tryin to get the user to read something of the screen you could use for example a label for him to validate what the label is telling him so add a label too or a textbox idc

for this example im using a label named label1
try this

VB.NET:
Private Sub ValidateUser_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ValidateUser.Click
        If TextBox1.Text = Label1.Text Then
            MessageBox.Show("Succesfully Validated")
        Else
            MessageBox.Show("Invalid Validation")
        End If
    End Sub

play about and see what you get,
ValidateUser is the Button on my form, TextBox1 is the textbox the user inputs the word and label1 is a label which has the word the user has to input
 
Last edited:
Thanks alot its ok with the validation . the scrollbars is not there in the toolbox and i only need vertical scrollbar only??

I tried ading a panel its effcting my application when adding my tools inside it???!
 
You really should only ask 1 question at a time unless they are dependant. There is a validating event for a textbox, and you have many options depending on your requirements. You can check for specific variable or use Regex to just check for a pattern. Let us know what you are wanting so we can come up with a good solution.
 
Auto scroll works when the controls are larger the the visual surface of the form itself. So if your panel is (1000,500) and your form is (500,500) then the scrollbars will appear. What do you mean the panel is affecting the controls?
 
If child controls because of size/placement is not fully visible within containers client rectangle then AutoScroll will cause the scrollbars to appear. You can easily test this in the designer by placing a control near form border, then resize the form.
 
if you looked in your toolbox there is a hScrollBar and a vScrollBar

look closely they are Arranged in A-Z easiest is to just select the All Windows Forms Menu in the Toolbox and it is located right near the bottom

but i dont think thats quiet what you want

anyway listen to John and NewGuy they know more than me probably
 
Back
Top