473,320 Members | 1,950 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,320 software developers and data experts.

Storing of points

37
Hi

I have a problem trying to store points. Each time plotButton is click, a point is plotted. I need to store the particular point as a variable so that it can be saved as a text file. And later on, when user open up the file again, it will automatically reads the points and plot them in place.

Here's my code for the plotting of points.

Expand|Select|Wrap|Line Numbers
  1. Private Sub plotButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles plotButton.Click, PlotToolStripMenuItem.Click
  2.  
  3.              If Me.count = 0 Then
  4.                 Audiogram.mypts.Add(New Point(104, 74))
  5.              ElseIf Me.count = 5 Then
  6.                 Audiogram.mypts.Add(New Point(104, 86))
  7.              ElseIf Me.count = 10 Then
  8.                 Audiogram.mypts.Add(New Point(104, 98))
  9.              End If
  10. End Sub
Oct 16 '07 #1
3 1196
Killer42
8,435 Expert 8TB
Just store an array of X/Y coordinates. You can save them to a file, and when you read them back, just pass them all to the "add a point" routine the same as if they were clicked.
Oct 17 '07 #2
tigger
37
Just store an array of X/Y coordinates. You can save them to a file, and when you read them back, just pass them all to the "add a point" routine the same as if they were clicked.

Expand|Select|Wrap|Line Numbers
  1. Audiogram.mypts.Add(New Point(104, 50))
We want to store these lines of code (which is declared as graphic) into an array (for eg. savePoint). But we don't know to declare SavePoint as what.. Single,Double etc? Cos graphics cannot be converted into Single or Integer. 'Expression does not produce a value' error will appear.
Oct 17 '07 #3
Killer42
8,435 Expert 8TB
Expand|Select|Wrap|Line Numbers
  1. Audiogram.mypts.Add(New Point(104, 50))
We want to store these lines of code (which is declared as graphic) into an array (for eg. savePoint). But we don't know to declare SavePoint as what.. Single,Double etc? Cos graphics cannot be converted into Single or Integer. 'Expression does not produce a value' error will appear.
I believe you only need to store the relevant information, which would be the 104 and the 50. You should be able to recreate the point from that.
Oct 17 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: m3ckon | last post by:
HI there, I currently store the date using the getdate() function but how can I store just the time or seperate the time off from a datetime datatype? M3ckon *** Sent via Devdex...
3
by: TP | last post by:
Hi, In SQL Server 2000, if I have to create a table to store a very large number of 10 digit telephone numbers, would I be better off to have a bigint field or just use a varchar field? If I do...
10
by: Whitney Kew | last post by:
Hello, I have a question regarding type conversion operators. Let's say I have a simple (nonsensical) class as follows: class MakeNewInt { private: int* _n;
6
by: Alfonso Morra | last post by:
I have written the following code, to test the concept of storing objects in a vector. I encounter two run time errors: 1). myClass gets destructed when pushed onto the vector 2). Prog throws a...
0
by: toton | last post by:
Hi, I have a little design related problem, and finding a good way to resolve it. To state the problem, I have points from writing of several documents. Each document represents a Session class ,...
12
by: rajus | last post by:
I want to store the (x,y) coordinates of about 10,000 points in a 2D array.How can I store them and retrieve them later?
5
by: toton | last post by:
Hi, I have a deque of Point class,. Point class have two fields x, and y. Now I want another class Character should point to a portion of the deque, and allow iteration only on the portion. Thus...
7
by: pereges | last post by:
I've to store an array of structures: typedef struct { double origin; double e_field_at_origin_real, e_field_at_origin_imag; double direction; double pathlength; int depth; }ray;
2
by: aeblank | last post by:
THE PROBLEM I'm running into performance issues generating and storing a randomly created graph in a SQL Server database. I have a T-SQL script that generates a graph, and then randomly connects the...
0
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...
0
isladogs
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...
0
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...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
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....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.