ok i have created a program where when a keydown command is pressed and it moves to the next form but the problem i am having is that when my first form loads the cursor goes into textbox 1 which means i cant perform my keydown command. i have tried disabling the text boxes but that changes the color to grey and i need the color to be the color my client wants
please help
change color of disabled textbox
Page 1 of 17 Replies - 621 Views - Last Post: 12 March 2013 - 09:41 PM
Replies To: change color of disabled textbox
#2
Re: change color of disabled textbox
Posted 10 March 2013 - 09:38 AM
You're building an app for a client in a language that went end-of-life about a decade ago? Should this be moved to VB.NET?
Please read: This is not the VB.NET forum
Please read: Is learning VB6 now a complete waste of time?
If this is *is* .NET you can set the form's KeyPreview to true, then put the Keydown handler in the form instead of the textbox.
But you can't change the color of the disabled textboxes. And disabling them is just a bad patch for the real problem. better to fix the design of the application so as to not cause the issue to begin with.
Please read: This is not the VB.NET forum
Please read: Is learning VB6 now a complete waste of time?
If this is *is* .NET you can set the form's KeyPreview to true, then put the Keydown handler in the form instead of the textbox.
But you can't change the color of the disabled textboxes. And disabling them is just a bad patch for the real problem. better to fix the design of the application so as to not cause the issue to begin with.
#3
Re: change color of disabled textbox
Posted 10 March 2013 - 09:46 AM
using vb6 as it is also part of my college work and the only language we can use (a pain i know but no choice) and can you do that in vb6
This post has been edited by GunnerInc: 10 March 2013 - 10:07 AM
Reason for edit:: Unnecessary quote removed
#4
Re: change color of disabled textbox
Posted 10 March 2013 - 10:00 AM
Really? holly sh!t. What country are you in that you're going to school for VB6? I'm going to guess India as I've heard it is still used there.
Honestly, if I were in you're shoes I wouldn't spend the money on it. You can learn a language from this century on-line, and you've shown you have internet access.
My standard beginner resources post - Updated JAN 2013
Plan your study route:
There are three routes people seem to take when learning programming.
For the life of me I can't figure out why people try 1 & 2. I strongly suggest taking the guided learning approach. Those book authors go in a certain order for a reason: They know what they're doing and they know the best order to learn the materials.
I don't learn from reading books: I learn by doing.
Resources, references and suggestions for new programmers.
Honestly, if I were in you're shoes I wouldn't spend the money on it. You can learn a language from this century on-line, and you've shown you have internet access.
My standard beginner resources post - Updated JAN 2013
Plan your study route:
There are three routes people seem to take when learning programming.
- Just start trying to create programs
- Start taking apart other programs and try to figure out the language by reverse engineering
- Follow a guided learning course (school or self-teaching books)
For the life of me I can't figure out why people try 1 & 2. I strongly suggest taking the guided learning approach. Those book authors go in a certain order for a reason: They know what they're doing and they know the best order to learn the materials.
- First learn the language by working 2-5 "Learn C# in 30 days" type books cover to cover.
- Do a dozen on-line tutorial projects where you build what you're told to build, the way you are told to build it WITH AN EXPLANATION OF WHY so you can learn.
- Learn to plan before you type.
- THEN you start designing software with a purpose.
I don't learn from reading books: I learn by doing.
Spoiler
Newbie/Rookie said:
I have little/no programming experience but I need to write a program by Friday that does XYZ.
Spoiler
Resources, references and suggestions for new programmers.
Spoiler
#5
Re: change color of disabled textbox
Posted 10 March 2013 - 10:05 AM
no live in England but its just are stupid exam board wanted the projects in vb6. i know java, c#, vb.net and a bit of python but just needed to know this sorry didn't know it was illegal to know a program which was a decade old
This post has been edited by GunnerInc: 10 March 2013 - 10:07 AM
Reason for edit:: Unnecessary quote removed
#6
Re: change color of disabled textbox
Posted 10 March 2013 - 10:29 AM
Chill dude. Didn't mean to insult you. Was just shocked to hear anyone was building new apps in this. Maintaining legacy apps, sure. I just couldn't imagine building a new app in it.
Best of luck with it.
Best of luck with it.
#7
Re: change color of disabled textbox
Posted 10 March 2013 - 11:56 AM
Slightly confused with what you're after??
If you're capturing the keydown event on the form, then set the KeyPreview property to true and this should enable your form to see the event before the textbox.
If you're capturing the keydown event on the form, then set the KeyPreview property to true and this should enable your form to see the event before the textbox.
#8
Re: change color of disabled textbox
Posted 12 March 2013 - 09:41 PM
You can change the BackColor property of the TextBox if you want it to be a different color.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote





|