Link to home
Start Free TrialLog in
Avatar of RickJa
RickJa

asked on

VB.Net formatting controls

Using Visual Basic.NET

Is there any way to format the textbox and combobox controls Border Color.  In MS Access, I was able to format the color of the border for the text and combo boxes.  I don't think vb6 allows this either.

Is this a situation where I have to go out and purchase 3rd party controls?

Also...Is there anyway to make a label automatically come over when inserting a new text box?  Access did this also.
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Aaaah, the nature of change.  Yes, there are always ways to accomplish what you want.  Access made somethings very easy to accomplish, where VB doesn't always go to those extremes.  I always felt like Access holds your hand a lot, but can make certain mundane things easier.  

It all depends on how much you are willing to do, and how much time you want to put into a solution.  There are many 3rd party controls, but they may not always do exactly what you want.  

There is a way to create your own UserControl that can contain both a label and a text box with a minimum of effort.

Bob
Avatar of RickJa
RickJa

ASKER

I think creating my own UserControl would save me sooo much time in the long run.  I have a style I want to keep throughout the program.
I increased the points...could you get me started with allowing the border color change and auto-label for my textboxes.
Step 1:  Auto-label:

(1) Create a UserControl.
(2) Drop a label and a text box on the design surface.
(3) Change the Anchor property for the text box to:  Left, Top, Bottom, Left, Right.
(4) Rebuild the solution.
(5) Find the My User Controls tab, and drop the User Control onto a form.

You can get fancier with this, but this is a good place to start.
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RickJa

ASKER

Your the man!

Could you tell me what "module" I drop that code into.  Is it my 'user control' module or the forms class module I want the control on...or..?
I hope I'm asking the right question...not sure.

Thanks Again.
You need to put all that code into the UserControl code view.