hamid Posted May 10, 2006 Posted May 10, 2006 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 Quote [ once4ever ]
Leaders snarfblam Posted May 10, 2006 Leaders Posted May 10, 2006 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. Quote [sIGPIC]e[/sIGPIC]
hamid Posted May 11, 2006 Author Posted May 11, 2006 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! Quote [ once4ever ]
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.