Drawing Rotated Ellipses With VB 6

  • Thread starter Thread starter DM
  • Start date Start date
D

DM

Hi All,

I've recently been given the task of modifying some legacy VB 6 code to do
with drawing rotated ellipses on a map at different zoom levels.

I guess I could find a formula for drawing one manually using the DrawLine
function or I could use the Windows graphics libraries to squash a perfect
circle and rotate it...

Is there an easier way to accomplish this or will I have to resort to manual
drawing methods?

Any suggestions greatly appreciated.

-Duncan
 
Hi Duncan,

You can draw ellipses reasonably easily, using the Graphics.DrawEllipse
method. That will only give you a horizontal or vertical orientated ellipse
though. Is that sufficient ?

Regards,

Bill.
 
Hi DM,

The name of this newsgroup is dotnet.languages.VB

The regulars here are most not using VB6 anymore or have only latent
knowledge.
However there is still an very active newsgroup named

There you find the people who real have still the best knowledge of classic
VB

Why we don't like it to answer it here you ask yourself maybe?

We and others use Google often to search this newsgroup.
It is then not pleasant to see afterwards that a sollution is for VB classic
and not working.in VB for dotNet.

Cor
 
Bill McCarthy said:
Hi Duncan,

You can draw ellipses reasonably easily, using the Graphics.DrawEllipse
method. That will only give you a horizontal or vertical orientated
ellipse though. Is that sufficient ?

Regards,

Bill.


Hi Bill,

Thanks for the reply.

Yes I can draw horizontal/vertical ellipses fairly easily but unfortunately
I have to be able to rotate them. The purpose of this is to represent a GPS
error ellipse on a map so they can subsequently have any orientation in a
0-360 degree range.

Also the program is written in VB 6 so I can't use any of the nifty .NET
graphics functions.

-Duncan
 
Hi Duncan,

Ah. I thought when you meant you were migrating a legacy app ;) Probably
best to ask in one of the VB6 newsgroups. I think you'll need to use Win32
api to draw a polygon or similar (or maybe transform the coordinate)

Regards,

Bill.
 
Back
Top