draw circles

  • Thread starter Thread starter knranjit
  • Start date Start date
K

knranjit

my points are:
10,10
20,20
30,30
40,40
and so on ....
With these points I can draw many lines continuosly.
Then I would like to place the small circle in the
connecting points like
20,20
30,30
40,40
and so on.....
How to do?
 
try this....

Dim gobj as Graphics = <activeform>.CreateGraphics()
gobj.Graphics.DrawEllipse(New Pen(Color.Black, 3), 10, 10, 10, 10)

Manasvin
 
Tested . .



Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Dim g As Graphics

Dim i As Single

g = Me.CreateGraphics()

For i = 10 To 40 Step 10

PlotPoint(i, i, 8, g)

Next

End Sub

Private Sub PlotPoint(ByVal x As Single, ByVal y As Single, ByVal diameter
As Single, ByVal g As Graphics)

Dim blackPen As New Pen(Color.Black, 1)

g.DrawLine(blackPen, (x - 1), (y - 1), (x + 1), (y + 1))

g.DrawEllipse(blackPen, x - (diameter / 2), y - (diameter / 2), diameter,
diameter)

End Sub

Regards - OHM
 
knranjit said:
my points are:
10,10
20,20
30,30
40,40
and so on ....
With these points I can draw many lines continuosly.
Then I would like to place the small circle in the
connecting points like
20,20
30,30
40,40
and so on.....
How to do?

You are a really funny guy! Are you getting paid for each new thread on
nearly the same subject? Seems so... Could you solve the previous problem in
the previous thread(s)? I asked several question to try to help you but you
didn't answer again. Very strange... I've already tried to explain by email
why ignoring all our replies and questions just trying to help you might
lead in getting no answer anymore in the future. Concerning me I am not
gonna reply again - seems to be "for the recycle bin".
 
Hi,

In addition to the other comments the pen has a startcap and endcap
properties. It allows you to have line start with a circle, square, or
arrow.

Dim p As New Pen(Color.Red)

p.EndCap = LineCap.RoundAnchor

p.StartCap = LineCap.ArrowAnchor

e.Graphics.DrawLine(p, 10, 250, 100, 250)

Ken
 
See,
This is the kind of thing which was annoying me back some two
months ago, but I got flamed for saying the similar thing to you.

Regards - OHM
 
One Handed Man said:
See,
This is the kind of thing which was annoying me back some
two
months ago, but I got flamed for saying the similar thing to you.

??
Could you please explain?
 
One Handed Man said:
PPL, not responding. Saying thanks etc

Yes, but I can't remember I didn't respond (well, rarely *g*). You wrote "I
got flamed for saying the similar thing to you.". As this was *your* reply
to *my* message I assumed *you* said *you* got flamed saying similar things
to *me*. ;-))

Man, complication about nothing. ;-)

[ ] EOT

:-)
 
Back
Top