I am trying to draw a long line. I have store the data in:
Structure MapPoint
Public GridEast As Single
Public GridNorth As Single
End Structure
Dim SouthIsland(1747) As MapPoint
To draw the line I was go to use:
Dim pn As Pen = New Pen(Color.DarkGreen, 1)
Dim points As Point() = {New Point(10, 10), New Point(10, 100), New
Point(200, 50), New Point(250, 300)}
e.Graphics.DrawLines(pn, points)
How do I get SouthIsland.GridEast() & SouthIsland.GridNorth() into Point()?
I could type in all 1747 like below, but there must be a better way.
Dim points As Point() = {New SouthIsland(0), New SouthIsland(1),...}
Simon 7 1119
point.x= mappoint.GridNorth
point.y=mapPoint.grid,East
Simon Morris wrote: I am trying to draw a long line. I have store the data in: Structure MapPoint
Public GridEast As Single
Public GridNorth As Single
End Structure Dim SouthIsland(1747) As MapPoint To draw the line I was go to use: Dim pn As Pen = New Pen(Color.DarkGreen, 1)
Dim points As Point() = {New Point(10, 10), New Point(10, 100), New Point(200, 50), New Point(250, 300)}
e.Graphics.DrawLines(pn, points) How do I get SouthIsland.GridEast() & SouthIsland.GridNorth() into Point()? I could type in all 1747 like below, but there must be a better way. Dim points As Point() = {New SouthIsland(0), New SouthIsland(1),...} Simon
"Simon Morris" <si**********@xtra.co.nz> schrieb I am trying to draw a long line. I have store the data in:
Structure MapPoint Public GridEast As Single Public GridNorth As Single End Structure
Dim SouthIsland(1747) As MapPoint
To draw the line I was go to use:
Dim pn As Pen = New Pen(Color.DarkGreen, 1)
Dim points As Point() = {New Point(10, 10), New Point(10, 100), New Point(200, 50), New Point(250, 300)}
e.Graphics.DrawLines(pn, points)
How do I get SouthIsland.GridEast() & SouthIsland.GridNorth() into Point()?
I could type in all 1747 like below, but there must be a better way.
Dim points As Point() = {New SouthIsland(0), New SouthIsland(1),...}
I would write a loop.
--
Armin http://learn.to/quote http://www.plig.net/nnq/nquote.html
Armin,
I forgot :-))
Of course
Cor
* "Simon Morris" <si**********@xtra.co.nz> scripsit: I am trying to draw a long line. I have store the data in:
Structure MapPoint Public GridEast As Single Public GridNorth As Single End Structure
Dim SouthIsland(1747) As MapPoint
To draw the line I was go to use:
Dim pn As Pen = New Pen(Color.DarkGreen, 1)
Dim points As Point() = {New Point(10, 10), New Point(10, 100), New Point(200, 50), New Point(250, 300)}
e.Graphics.DrawLines(pn, points)
How do I get SouthIsland.GridEast() & SouthIsland.GridNorth() into Point()?
I could type in all 1747 like below, but there must be a better way.
Dim points As Point() = {New SouthIsland(0), New SouthIsland(1),...}
\\\
ReDim points(SouthIsland.Length - 1)
Dim i As Integer
For i = 0 To SouthIsland.Length - 1
point(i) = SouthIsland(i)
Next i
///
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
<http://www.plig.net/nnq/nquote.html>
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schrieb * "Simon Morris" <si**********@xtra.co.nz> scripsit: I am trying to draw a long line. I have store the data in:
Structure MapPoint Public GridEast As Single Public GridNorth As Single End Structure
Dim SouthIsland(1747) As MapPoint
To draw the line I was go to use:
Dim pn As Pen = New Pen(Color.DarkGreen, 1)
Dim points As Point() = {New Point(10, 10), New Point(10, 100), New Point(200, 50), New Point(250, 300)}
e.Graphics.DrawLines(pn, points)
How do I get SouthIsland.GridEast() & SouthIsland.GridNorth() into Point()?
I could type in all 1747 like below, but there must be a better way.
Dim points As Point() = {New SouthIsland(0), New SouthIsland(1),...}
\\\ ReDim points(SouthIsland.Length - 1) Dim i As Integer For i = 0 To SouthIsland.Length - 1 point(i) = SouthIsland(i) Next i ///
Very close. ;-)
ReDim points(SouthIsland.Length - 1)
Dim i As Integer
For i = 0 To SouthIsland.Length - 1
points(i).x = CInt(SouthIsland(i).GridEast)
points(i).y = CInt(SouthIsland(i).GridNorth)
Next i
--
Armin http://learn.to/quote http://www.plig.net/nnq/nquote.html
* "Armin Zingler" <az*******@freenet.de> scripsit: Very close. ;-)
ReDim points(SouthIsland.Length - 1) Dim i As Integer For i = 0 To SouthIsland.Length - 1 points(i).x = CInt(SouthIsland(i).GridEast) points(i).y = CInt(SouthIsland(i).GridNorth) Next i
Thanks... I missed that the type of the points in 'SouthIsland' was
'MapPoint' *lookingformyglasses*.
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
<http://www.plig.net/nnq/nquote.html> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jon Cosby |
last post by:
I'm using this to draw rectangles in a PictureBox image. Not all of the
rectangles are complete, and after drawing several, some of them start
disapearing. What's the reason for this?
Pen...
|
by: Rich |
last post by:
Hello,
I am trying to draw a graph on a form. I can draw the box
using drawline, and bars inside the box using
drawrectangle, but when I try to draw a line inside the
box the inner lines are...
|
by: Smoke |
last post by:
It is possible to draw a line on a control using AA? basically, i need the normal .DrawLine funcion but that support antia aliasing.
is this possible? can somebody tellme how?
Thanks for the...
|
by: google_groups3 |
last post by:
Hi, is it better practise to draw a line on my form using the
Graphics.DrawLine command or should I use a label control instead?
I am refering to overall speed of the form and amount of memory...
|
by: John |
last post by:
I created a number of pictureboxes in a panel, and want to draw lines in
those pictureboxes but I cannot. Please see the following code and make
corrections.
Thanks.
Private Sub...
|
by: Lila Godel |
last post by:
I am migrating my VB6 GoldMine add-ons to VB.NET to allow for
enhancements. I have no problem getting text to print, but I cannot get the
4 PrintPage events that are needed to print a line to work....
|
by: Stu |
last post by:
Hi,
Why does the code below only draw the last line of the loop? I was expecting
this to draw 10 parallel lines. More to the piont....how do I get it to draw
10 parallel lines?
Public...
|
by: Ben Bush |
last post by:
I had the following code and when I clicked the left mouse button one
time. I got green line and the second click got a purple line and the
green disappeared.
I was confused by two questions:...
|
by: intrepid_dw |
last post by:
All
I am writing a C# WinForms application which is giving me some
problems.
The application consists of a form containing an empty Tab control to
which TabPages are added dynamically (at...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |