Follow us on Twitter!
Things are more like they are now than they have ever been before. - Dwight D. Eisenhower
Monday, April 27, 2015
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: 20
Guests Online: 19
TeamSpeak Online : 5 Members Online: 1

Registered Members: 88068
Newest Member: chan
Latest Articles
Our sponsor needs your help!


One of our sponsors needs your help, http://www.virginmediabusiness.co.uk/pitch-to-rich/grow/krystal-hosting/
Go check out their video and Don't forget to vote !


~ Thanks for your help
HBH
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