change bordertype and color

D

denappel

Hi,

I'm making a winforms application, and I would like to make it
graphically a bit nicer then a standard windows application style.
There are certain skinning frameworks, but they are commercial and I
would just like to make a few enhancements.

At the moment my main concern is the border style, and the border
color.

How can I get rid of this blue xp color border type and top.
Can I somehow code it different, so that I can get another border
color and style.

Does anybody have experience in that?

Otherwise if somebody has good skinning articles or articles about how
to improve the graphical look of an winforms application, please post
some links here!

I read one article which was quite ok, but by implementing and
extending it, I had some problems when resizing the window, so I had
to stop using this approach.
Here is the link:
http://www.atalasoft.com/cs/blogs/j...-deep-skinning-your-winforms-application.aspx

Thanks for all your reactions!

Greetz,

Koen
 
F

Fred

Dans :
denappel écrivait :
Hi,
Hello,

I'm making a winforms application, and I would like to make it
graphically a bit nicer then a standard windows application style.
At the moment my main concern is the border style, and the border
color.

I use the following method. I'm not sure it is the best.
For a simple example, I consider a textbox.
I create a user control with no borders.
Inside, I put a textbox with no borders.
And then I add this code in the user control class (vb)

Private m_BorderColor As Color = Color.Black

Public Property BorderColor() As Color
Get
Return Me.m_BorderColor
End Get
Set(ByVal value As Color)
Me.m_BorderColor = value
End Set
End Property

Protected Overrides Sub OnPaint(ByVal e As
System.Windows.Forms.PaintEventArgs)
ControlPaint.DrawBorder(e.Graphics, _
Me.ClientRectangle,
_
Me.BorderColor,
_
ButtonBorderStyle.Solid)
MyBase.OnPaint(e)
End Sub


I don't know how to draw a true border (outside the client area). I
think it is done by windows APIs. Others will probably explain this
better than I can.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top