Follow us on Twitter!
You cannot teach a man anything; you can only help him find it within himself. - Galileo
Wednesday, April 16, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 24
Guests Online: 17
Members Online: 7

Registered Members: 82813
Newest Member: VesuviusSentinel
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

VB Little Help...


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 23-12-05 06:55
Hey, I dont really know that much VB but I am having a little problem....

As far as i know this is correct
Code

Private Sub txtUser_Change(Index As Integer)
    txtUser.Text = "hi"
End Sub




txtUser is an input field...

What I was trying to do is when someone typed anything in it. that it would change the text to hi

I have also tried things like...

Code
If txtUser.Text = "bah" Then




But gives me a compiling error when it gets to it...


Code
Private Sub cmdTest_Click()
    If txtUser.Text = "test" Then
        If txtPass.Text = "test" Then
            txtCor.Text = "Username, Password correct."
        Else
            txtCor.Text = "Password is incorrect.
        End If
    Else
        txtCor.Text = "Username Incorrect.."
    End If
End Sub




I am sure im doing this wrong. Just need a little help. Havnt searched google but just thought I would post it here also.



/// Edit

All I can find on google is what i am trying. Which is .Text




Edited by on 23-12-05 07:22
Author

RE: VB Little Help...


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 23-12-05 08:21
You mean something other than a missing quote?


Author

RE: VB Little Help...


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 23-12-05 09:36
This line
Code
Private Sub txtUser_Change(Index As Integer)



makes me think you made it a control array, so you should do
Code

txtUser(Index).Text = "hi"





And also, could you specify the compiling error you get?


Author

RE: VB Little Help...


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 23-12-05 11:49
Yea i accidently made it an array.... Pfft dont copy and paste input fields in visual basic Smile




Edited by on 23-12-05 11:49