• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

VB6 textbox setFocus function?

mjz_5

2[H]4U
Joined
May 24, 2001
Messages
3,637
txtEmployeeTemp.Visible = True
txtEmployeeTemp.Enabled = True
txtEmployeeTemp.Text = " "
txtEmployeeTemp.SetFocus

There are a bunch of textboxes on a form and i just want this one to be the “active/selected” textbox, so i can just start typing. I’m confused why this wont work? :(

When running the program, i get the following error:

Run-time error ‘5’:
Invalid procedure call or argument/
 
i don't know vb6, just .net stuff..but there should be a method to select text in that textbox..try selecting the text (usually such a method takes in the start and end index, pass both as the length of the string so it puts the cursor at the end of what's in the text box and selects nothing :)).. i think it'll do what you want.
 
Back
Top