|
-
Jun 17th, 2004, 07:22 PM
#1
Thread Starter
Lively Member
customed look for button control
Hello there, i designed a button control (inherited from windows.forms.button) that has rounded corners, the problem is that when placing the button on an non-solid coloured background it appears as having sharp corners because i can't predict the exact color of the background pixels underneath the corner areas of the button.
What i would like to try do is to make a bitmap the size of my [button.bounds] from the background of the form containing my custom button, and use this bitmap as background for my button.
i figure this might be the sollution and i have no clue on how to achieve this, but if anyone has a better ideea please share it with me.
if all this is too confusing, here is how i begin drawing my button:
VB Code:
Protected Overrides Sub OnPaint(ByVal pe As System.Windows.Forms.PaintEventArgs)
MyBase.OnPaint(pe)
pe.Graphics.Clear(Parent.BackColor)
this works as long as i keep my forms simple, but at some points i have some forms that have a gradient-filled background (using paint event method).
got my dillema ?
Last edited by mindloop; Jun 17th, 2004 at 07:27 PM.
ehmm...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|