Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Lock Textbox once focus changed.
Name: haynzee Date: May 8, 2006 at 12:47:10 Pacific OS: xp CPU/Ram: na Product: na
Comment:
Hi, i am fairly new to VB and have version 6. I have 2 text boxes that need numbers to be entered into them. Now Text2 insnt enabled until text1 has numbers entered into it, which is fine but what i want is as soon as the user clicks text2 or it gets the focus then i want it to lock the numbers in text1 so they cannot be changed. Any ideas??
Also guys i want to make sure that the number in Text 2 has to be bigger than text1 any ideas how i can do that too.
Like i said im new to Vb but its for college and ive done a google but cant find anything.
thanks
Mark
AMD Athlon 64 3500+ sct 939 Gigabyte K8NXP-SlI Radeon X700pro 256mb 1GB Kingston value ram 3200 Audigy 2 ZS 200GB Maxtor SATA HDD DVD Rom
Name: Chi Happens Date: May 9, 2006 at 04:40:30 Pacific
Reply:
text1.enabled = false
Chi
They mostly come at night...mostly.
0
Response Number 2
Name: Stephen Hall Date: May 10, 2006 at 13:13:24 Pacific
Reply:
Do you have a textbook? Have you learned about conditional expressions (like if, else, etc.) (I'm serious, not trying to be mean here). If so, check them out and see if you can come up with anything on the number needing to be bigger.
Stephen
"Live long and PROGRAM......or at least do _something_ with all that time...!"
Summary: You could do it a couple of ways. You could wait until the textbox loses focus (probably not that great of an idea), or you could just slightly modify the routine you've already written to first chec...
Summary: If you want to make it update without pressing a command button use some of the textbox methods (ie. change) Private Sub txtOne_Change() lblOne.Caption = txtOne.Text End Sub Jimbo ...
Summary: Chi Dawg- When you submit a post initially, the confirm page comes up. On the confirm page there is a link that says "Trying to post programming code? Click here." That will take you to a javascrip...