473,405 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Painting 3D Edge on Ovals

You know there is the controlpaint.Draw3DBorder and it works great for
rectangles.
How can one do this on ovals.

'thi is my rectangle code
ControlPaint.DrawBorder3D(g, rctShape.X, rctShape.Y, rctShape.Width,
rctShape.Height, Border3DStyle.Sunken, Border3DSide.Top Or Border3DSide.Left
Or Border3DSide.Right Or Border3DSide.Bottom)

Is there a way for ovals or do I need to design one.

If so, how?

Thanks,

Shane
Nov 20 '05 #1
4 1501
* "SStory" <Th*******@TAKEOUTTHISSPAMBUSTERsofthome.net> scripsit:
You know there is the controlpaint.Draw3DBorder and it works great for
rectangles.
How can one do this on ovals.

'thi is my rectangle code
ControlPaint.DrawBorder3D(g, rctShape.X, rctShape.Y, rctShape.Width,
rctShape.Height, Border3DStyle.Sunken, Border3DSide.Top Or Border3DSide.Left
Or Border3DSide.Right Or Border3DSide.Bottom)

Is there a way for ovals or do I need to design one.


You will need to design one.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
Thanks.

Any suggestions for how to do this and get the type of style listed below?
Seem I will be either drawing 2 ellipses or many arcs.

I assume I should use systemcolors 3d light and the like also.

Any pointers?

Thanks
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2k************@uni-berlin.de...
* "SStory" <Th*******@TAKEOUTTHISSPAMBUSTERsofthome.net> scripsit:
You know there is the controlpaint.Draw3DBorder and it works great for
rectangles.
How can one do this on ovals.

'thi is my rectangle code
ControlPaint.DrawBorder3D(g, rctShape.X, rctShape.Y, rctShape.Width,
rctShape.Height, Border3DStyle.Sunken, Border3DSide.Top Or Border3DSide.Left Or Border3DSide.Right Or Border3DSide.Bottom)

Is there a way for ovals or do I need to design one.


You will need to design one.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #3
Hi,

If you draw a white arc on half of the ellipse and black on the other
it will appear 3d. If the white is on top it appears raised and the
bottom it appears sunken.

Private Sub Form1_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
Dim g As Graphics = e.Graphics
Dim pTop As New Pen(Color.White, 1)
Dim pBottom As New Pen(Color.Black, 1)
Dim rDraw As New Rectangle(400, 10, 50, 50)
g.FillEllipse(Brushes.SkyBlue, rDraw)

g.DrawArc(pTop, rDraw, 0, 360)
g.DrawArc(pBottom, rDraw, 0, 180)
End Sub

Ken
---------------------------

"SStory" <Th*******@TAKEOUTTHISSPAMBUSTERsofthome.net> wrote in message
news:uU**************@TK2MSFTNGP12.phx.gbl:
Thanks.

Any suggestions for how to do this and get the type of style listed below?

Seem I will be either drawing 2 ellipses or many arcs.

I assume I should use systemcolors 3d light and the like also.

Any pointers?

Thanks
"Herfried K. Wagner [MVP]" <HYPERLINK
"mailto:hi***************@gmx.at"hi*************** @gmx.at> wrote in message

news:2k************@uni-berlin.de...
* "SStory" <HYPERLINK
"mailto:Th*******@TAKEOUTTHISSPAMBUSTERsofthome.ne t"TheStorys@TAKEOUTTHISSPA
MBUSTERsofthome.net> scripsit:

You know there is the controlpaint.Draw3DBorder and it works great
for
rectangles.
How can one do this on ovals.

'thi is my rectangle code
ControlPaint.DrawBorder3D(g, rctShape.X, rctShape.Y, rctShape.Width,
rctShape.Height, Border3DStyle.Sunken, Border3DSide.Top Or
Border3DSide.Left
Or Border3DSide.Right Or Border3DSide.Bottom)

Is there a way for ovals or do I need to design one.

You will need to design one.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>


--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.6 - Release Date: 6/25/2004
Nov 20 '05 #4
I will give that a try Ken.

Thanks,

Shane.
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi,

If you draw a white arc on half of the ellipse and black on the other
it will appear 3d. If the white is on top it appears raised and the
bottom it appears sunken.

Private Sub Form1_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
Dim g As Graphics = e.Graphics
Dim pTop As New Pen(Color.White, 1)
Dim pBottom As New Pen(Color.Black, 1)
Dim rDraw As New Rectangle(400, 10, 50, 50)
g.FillEllipse(Brushes.SkyBlue, rDraw)

g.DrawArc(pTop, rDraw, 0, 360)
g.DrawArc(pBottom, rDraw, 0, 180)
End Sub

Ken
---------------------------

"SStory" <Th*******@TAKEOUTTHISSPAMBUSTERsofthome.net> wrote in message
news:uU**************@TK2MSFTNGP12.phx.gbl:
Thanks.

Any suggestions for how to do this and get the type of style listed below?
Seem I will be either drawing 2 ellipses or many arcs.

I assume I should use systemcolors 3d light and the like also.

Any pointers?

Thanks
"Herfried K. Wagner [MVP]" <HYPERLINK
"mailto:hi***************@gmx.at"hi*************** @gmx.at> wrote in message
news:2k************@uni-berlin.de...
* "SStory" <HYPERLINK
"mailto:Th*******@TAKEOUTTHISSPAMBUSTERsofthome.ne t"TheStorys@TAKEOUTTHISSPA MBUSTERsofthome.net> scripsit:

> You know there is the controlpaint.Draw3DBorder and it works great
> for
> rectangles.
> How can one do this on ovals.
>
> 'thi is my rectangle code
> ControlPaint.DrawBorder3D(g, rctShape.X, rctShape.Y, rctShape.Width,
> rctShape.Height, Border3DStyle.Sunken, Border3DSide.Top Or


Border3DSide.Left
> Or Border3DSide.Right Or Border3DSide.Bottom)
>
> Is there a way for ovals or do I need to design one.

You will need to design one.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>


--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.6 - Release Date: 6/25/2004

Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Andrew Jones | last post by:
Another problem! :) I'm trying to make a navigation bar with the left edge on the edge of the page - but I mean *right* on the edge of the page. 'margin-left: 0px;' doesn't seem to work, it...
0
by: Harry_Crow | last post by:
I'm painting in the Non Client area of the control. I'm facing some flicker problem. Is it possible to achive Double buffer painting in Non Client area. The SetStyle with...
0
by: Ferdi Smit | last post by:
I wrote a generic algorithm for boost.graph to merge two vertices, ie. the end-points of an edge are joined together as if they are a single vertex. I'm currently doing this by creating a new...
0
by: Alexander Brown | last post by:
Hello, Can anyone suggest a solution to my problem. I have a number of irregularly shaped, overlapping, semi transparent controls. When these controls are resized (which they are, constantly)...
2
by: copyco | last post by:
Does anyone have any suggestions on this? I have a form that can be collapsed into a compact size and expanded back to full size. If the user moves the compact size of the form close to the edge,...
2
by: as | last post by:
Hi folks, am a newbie in C++ world. Normally I use matlab more often. But right now I want to create a Rising Edge D Flip-Flop model which has two Digital inputs, i.e. INPUTDATA and a CLOCK. The...
0
by: darrenhello | last post by:
hi there, I am doing my last year's project and I have a 'little' problem. I have to do an edge detection filter. for now, some normal edge detection filters that I used worked fine but there a...
4
by: Marina Levit | last post by:
I am trying to do some processing on a background thread while keeping the UI painting. However, this is a generic server side call routine - and it needs to block until the server side call...
10
by: Aurora88 | last post by:
Hi guys. I have had this problem for so long now it's making me feel so depressed. :x I am trying to display 42 ovals (connect 4) on JPanel but it seems to display a huge white box at the top of...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.