create new style for textbox and forms

hamid

Centurion
Joined
Jul 13, 2004
Messages
114
i want create style for my textboxs and forms
i need to change textboxs border color
how can i create new style object and set it to my forms and textboxs?
how can i change textbox border color and size
 
As far as textbox borders go, they don't come with an option for border color and size, but what you can do is put a borderless text box inside another control and use that control as the border. For example, put a text box inside a panel with a two pixel margin around the text box and set the panel backcolor to red. Bingo, two-pixel red border. This is kind of a hack, though.

For the forms, what do you want to do? Change the color? Or replace all the graphics? If you want to do the latter, you need to draw your own graphics, of course. Set the form's border style to none and display your own graphics in whatever way makes sense. Make it the BackgroundImage or draw it yourself in the Paint event or override OnPaint. Then the fun stuff: you have to implement your own window dragging, resizing, caption buttons, etc.
 
thanks marble.
i want create a style object once and set it to all of my forms in this case when i change my style then my forms be changed!
 
Back
Top