topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday October 6, 2024, 2:21 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Plz Record the (X,Y) cordinates. 2 Versions Available  (Read 25941 times)

justabeginner

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 52
    • View Profile
    • Donate to Member
I have an idea for a program to record the coordinates of an adjustable grid to a text file. A transparent image could be loaded under the griid, so that important points could be recorded.

I wanted to have an adjustable grid setting.
I would also like to put in my own points in with right click of the mouse (and perhaps remove a point with a left click).

I've seen some code for a basic paint program, but I was stumped on how to record the (X,Y) position of a mouse into a textbox or text file.

The picture hopefully describes what I mean.



idea1.GIF



I have found this: Simple Image Mapping Utility   (seems interesting)

hxxp://www.codeproject.com/KB/GDI-plus/ImageMapperPackage.aspx




There are now two different versions available:

A Net version  (A real nice app with lots of features- shows and saves points, calculates distances, point can be moved)
Thanks cbbibleboy for all the great amount of effort that you have put into the project so far.

A Vb6 Version  (Not so professional - no points shown on screen, but can save to file or use OLE, calculates areas of enclosed shapes)




« Last Edit: June 18, 2008, 09:39 PM by justabeginner »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,913
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: Record the (X,Y) cordinates to a text file Plz.
« Reply #1 on: April 23, 2008, 12:15 AM »

justabeginner

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 52
    • View Profile
    • Donate to Member
Re: IDEA: Record the (X,Y) cordinates to a text file Plz.
« Reply #2 on: April 23, 2008, 01:58 AM »
 :)

I wanted to have an adjustable grid setting. I'm not sure if the above programs do that.

I would have also liked to put in my own points in with right click of the mouse, and perhaps remove a point with a left click.


I have searched the Planet VB Source site and have got some ideas for part of the code, as the program is similar to a basic paint program. I'm just a bit confused on how to record the coordinates to a text file, after the mouse has been clicked. Any ideas would be greatly appreciated.

I appreciate your reply Mouser.

Thankyou for your input.
« Last Edit: April 23, 2008, 02:10 AM by justabeginner »

cbbibleboy

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 17
    • View Profile
    • Donate to Member
Re: IDEA: Record the (X,Y) cordinates to a text file Plz.
« Reply #3 on: May 15, 2008, 02:32 PM »
So I can better design the app, what is its purpose?

BTW I'm about halfway done with it now--what parameters would it need (e.g. variable grid size, variable opacity)?
« Last Edit: May 15, 2008, 05:38 PM by cbbibleboy »

cbbibleboy

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 17
    • View Profile
    • Donate to Member
Re: IDEA: Record the (X,Y) cordinates to a text file Plz.
« Reply #4 on: May 16, 2008, 02:01 AM »
Is this generally what you are describing (plus xy coordinates to text and a couple other options)?

See attachment...

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,913
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: Record the (X,Y) cordinates to a text file Plz.
« Reply #5 on: May 16, 2008, 02:28 AM »
Just tried it -- that's pretty cool cbbibleboy -- the transparency effect and dynamic grid sizing is pretty nice.

cbbibleboy

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 17
    • View Profile
    • Donate to Member
Re: IDEA: Record the (X,Y) cordinates to a text file Plz.
« Reply #6 on: May 18, 2008, 09:45 PM »
Here's the Beta. Enjoy! Feedback and suggestions are very much welcomed--email is in the about dialog.  ;D

justabeginner

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 52
    • View Profile
    • Donate to Member
Re: IDEA: Record the (X,Y) cordinates to a text file Plz.
« Reply #7 on: June 02, 2008, 01:14 AM »
Hi cbbibleboy.


Thankyou for your great contribution. I had not been on donation coder for a while due to a family member getting sick (Sorry about not replying earlier as I was not on the Net much until today). I have tried out the first version of "coordinator.exe" and was quite impressed. I really like the simple design, the scaling and the opacity feature.

I had trouble running the beta version, as an error message was coming up saying that I need Net Framework Ver. 3.5. Hopefully I will find the upgrade on a PC magazine DVD which I had bought lately. I'm not sure if you had implemented a "save the coordinates feature", so I'm really hanging out to update my net framework to test out the latest version of the program.

I will try to get back to you soon to let give you some more feedback on the beta version.

Thanking you very much for your great help and also for the time that you had spent,

Justabeginner (till I learn some more)


PS.  Hopefully I'll be able get to your Email in the About Dialog when I've done the Net Framework update.





« Last Edit: June 02, 2008, 01:32 AM by justabeginner »

justabeginner

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 52
    • View Profile
    • Donate to Member
Re: IDEA: Some more Ideas
« Reply #8 on: June 04, 2008, 10:24 PM »
Here are a few more Ideas that I had, to improve the program.  I'm still really happy with the program so far. Thanks cbbibleboy.

new comb.JPG


cbbibleboy

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 17
    • View Profile
    • Donate to Member
Re: IDEA: Record the (X,Y) cordinates to a text file Plz.
« Reply #9 on: June 08, 2008, 04:39 PM »
Version 2.0.0.0!  I've added all suggested features plus a few more (minus print screen which already has a key on the keyboard). Enjoy!

[attachimg=#1][/attachimg]

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,913
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: Record the (X,Y) cordinates to a text file Plz.
« Reply #10 on: June 08, 2008, 05:26 PM »
this is starting to look impressive.
i was skeptical of the idea of making such a program given that there are some existing ones already, but you're starting to get into the area where Coordinator could give these guys a run for their money.

you guys should check out the other tools i listed above and see what other kinds of features might be useful.

justabeginner

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 52
    • View Profile
    • Donate to Member
cbbibleboy,

Once again I'm impressed with the newest version of coordinator. It's looking fanstastic. You have put quite a lot of work into the program. I really like the "move the origin feature". I've come across a few problems and have had some more ideas. I have attached a VB area calculator program from VB Planet that I was impressed with (I modified it a bit to add a save coord feature, OLE support, and copy to clipboard feature) and also a word document to outlining the probs. and some more ideas for our coordinator program. Both attachments are zipped.



The Minor Probs.

1.   Getting an exception fault “Index was out of range”  when clicking slightly off center (towards the negative x side?)
2.   The last point does not seem to join the original first point when enclosing a shape. I can only do it by using the move menu option after placing the    last point to a temporary position.

Some more ideas for improvements

1.   Perhaps use a “dragover” event to move an incorrectly placed point. Your Right mouse click menu is also quite good.

2.   Double clicking on the last point to stop joining the points & then clicking elsewhere to start a new set of joined points again.
   (The original points are still on the screen, and the points still keep on numbering)

   Or Right mouse clicking on the last point to get a menu “Start New Unjoined Point” option.

Also when restarting having the words End-Restart appear in the coordinates list (Useful for creating multiple closed shapes).

3.    Having OLE enabled in the coordinates textbox list, so one can also drag the list of coordinates directly into Wordpad/MSWord (another method    to save the points). See polygon area calculator program from Planet VB to see what I mean.

4.   Default start grid size = 30 px  ?

5.   Use a snap to grid size option of ½ of a square. See polygon area calculator program from Planet VB to see what I mean.

6.   Perhaps having an option to calculate the area of an enclosed shape? 
   See polygon area calculator program from Planet VB to see what I mean.
   To activate this function:
   Use Shift and right click on each of the lines enclosing the desired shape (the selected lines change to an active colour).
   Then click on an Icon to calculate the area.

7.   Perhaps also saving the coordinates to a separate 2 column listbox so that the X and Y coordinates can be placed into a spreadsheet.



Once again cbbibleboy, thanks for all your help, support and words of wisdom.

Justabeginner (and still learning)


« Last Edit: June 18, 2008, 09:22 PM by justabeginner »

tsaint

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 497
  • Hi from the a*** end of the earth
    • View Profile
    • Read more about this member.
    • Donate to Member
that looks really good cbbibleboy and I'd love to try it, but after 4 attempts I can't get it to install (I enter some sort of net framework hell)
tony

justabeginner

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 52
    • View Profile
    • Donate to Member
TSaint, you need to download the Net Framework Ver. 3.5 from www.microsoft.com .
The full version was 201 Mb in size.

Then the program will work.

tsaint

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 497
  • Hi from the a*** end of the earth
    • View Profile
    • Read more about this member.
    • Donate to Member
Sounds good in theory but....
to install the coord program I need to install the net 3.5. To install the net 3.5 I need to install windows installer 3.1.
Now the WI3.1 has a rather endearing habit of semi-installing - it gets to the apparent end of the process and gleefully announces "Access denied" and then offers a partial rollback (I assume, as its parting words, after indicating it was removing setup files, are to the effect that WI3.1 has sortof been installed and might not work) BTW, I'm logged on with admin rights.
A reboot later (thanks for letting me know so I could save other stuff first) and I'm no better off - Net 3.5 still won't install. So the coords program won't install.
thanks for the advice anyway though.
 

justabeginner

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 52
    • View Profile
    • Donate to Member
Re: Made Another Version
« Reply #15 on: June 18, 2008, 09:30 PM »
Hi people. I had a go at making something similar, but it's not as good as the Net version (in my opinion). The Capture facilty still needs some tweaking.

my_coord.JPG
« Last Edit: June 18, 2008, 09:42 PM by justabeginner »

cbbibleboy

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 17
    • View Profile
    • Donate to Member
Re: IDEA: Plz Record the (X,Y) cordinates. 2 Versions Available
« Reply #16 on: June 21, 2008, 05:52 PM »
     Well, on that note, Version 3.0 of Coordinator is done! All requested features have been integrated in some form or another. Unfortunately it's taken me a while--work has been a bit crazy lately, I've been preparing for an upcoming leadership at our church's summer middle- and high-school camps, and I've been preparing for a missions trip to St. John later this summer. Nevertheless, this version is complete, and (finally) I've figured out how to draw lines anti-aliased.

I was unable to replicate the exception after clicking hundreds of points. I basically reorganized the entire drawing system though, so the issue may have resolved itself (I suspect that is the what caused the exception in the first place). Also, the original behavior of not allowing you to close shapes was intentional--I didn't think you would want it to allow duplicate points. Now, it will only prevent placing a new point if that point is the same as the previous (accidental double-click) or the previous's previous (double-backing).

Comments are more than welcome, but I won't get them for a week or so (away at aforementioned camps). Enjoy  :)

[attach=#1][/attach]

justabeginner

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 52
    • View Profile
    • Donate to Member
Re: IDEA: Plz Record the (X,Y) cordinates. 2 Versions Available
« Reply #17 on: June 22, 2008, 11:54 PM »
cbbibleboy,

LOOKING REAL GOOD. The updated version looks fantastic. I like the clean, clear anti-aliased look. Thanks for adding the area function, the closed path functionality, the coordinate list box and the many other bits and pieces. A real great effort.


mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,913
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: Plz Record the (X,Y) cordinates. 2 Versions Available
« Reply #18 on: June 23, 2008, 12:01 AM »
When a program advances to this state of excellence, there is really only one thing to do and that is to make a web page for it, and then to look at those other similar programs i mentioned initially and see what features Coordinator is missing, and then make Coordinator the best.

cbbibleboy

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 17
    • View Profile
    • Donate to Member
Re: IDEA: Plz Record the (X,Y) cordinates. 2 Versions Available
« Reply #19 on: July 01, 2008, 01:01 PM »
I'm honestly still a bit confused about what it's useful for! I guess it could be used to extract data from a printed graph, but then why would one need to find the area of a polygon??? Hmmm... whatever. As long as it helps someone out, I'm happy.

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: Plz Record the (X,Y) cordinates. 2 Versions Available
« Reply #20 on: July 01, 2008, 01:20 PM »
I'm honestly still a bit confused about what it's useful for!
If it's useful (or just fun ;)) for others, and entertaining for you, it's a great program!

justabeginner

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 52
    • View Profile
    • Donate to Member
Re: IDEA: Plz Record the (X,Y) cordinates. 2 Versions Available
« Reply #21 on: July 09, 2008, 12:17 AM »
Uses

My original use was to create math puzzles, like those in the back of high school maths text book.

Other applications:

Travel itineries - working out the best way to see the important all the things that you want to see, with the minimum travel distance.

Creating network diagrams  - suitable for work out best delivery routes for delivery jobs.

Building industry - useful for working out the amount of materials reuired (such as tiles, carpets, etc.)

Real estate/property development: Working out the total perimeter and area of various properties.

Plan drawing - drawing accurate plans for houses etc.

Copying items - tracing over identical items to create accurate duplicates (could be used in manufacturing)


And many more uses.





cbbibleboy,

I've found a window snapscreen capture program done in Csharp. I tried to open the listing the you sent me for version 2, but it would not open. Would  you be able to send me the code listing for Version 3?










Justabeginner

 
« Last Edit: July 09, 2008, 12:39 AM by justabeginner »

justabeginner

  • Honorary Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 52
    • View Profile
    • Donate to Member
Re: IDEA: Plz Record the (X,Y) cordinates. 2 Versions Available
« Reply #22 on: July 22, 2008, 09:52 PM »
cbbibleboy, would it be possible to add one more feature of making a selected line visible or not visible?

I'm thinking of of right clicking on a selected line and setting it to the background colour from the right click mouse-menu.