| | |
Image Plotting Problem
Please support our C# advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: May 2007
Posts: 81
Reputation:
Solved Threads: 1
I'm having trouble on how am going to start this idea of mine. I have an image and I want to plot points on that image. My Idea is to get the X and Y coordinates of the mouse pointer and save it into a text file so that by the time I re-run the program again, the plotted points is still there. But it seems like this is not a good idea since everything will be messed up if I load the program to a computer with different screen size. I was thinking of placing an invisible grid, but looks like this will be tough to do.
You could look at this snippet http://www.daniweb.com/code/snippet1020.html
It uses coordinate transformations, so you are independent of a screen.
You can have an invisible grid by adding a form with FormBorderStyle set to none and Opacity set to zero Be carefull you must provide another way to close this form than the usual closebox because there isn't one.
It uses coordinate transformations, so you are independent of a screen.
You can have an invisible grid by adding a form with FormBorderStyle set to none and Opacity set to zero Be carefull you must provide another way to close this form than the usual closebox because there isn't one.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Make love, no war. Cave ab homine unius libri.
Danny
•
•
Join Date: Jul 2008
Posts: 49
Reputation:
Solved Threads: 7
Well, you could create a 2D array to resemble the grid. When someone clicks on the mouse, you could take the mouse pointer (relative to the window not the screen) and convert it to the position in your array. You could even create a nice little collection class to store the grid and then simply serialize it when you need to store the grid.
![]() |
Similar Threads
- Turbo C doubt (C++)
- Graphics In Pixel: Part II (C++)
Other Threads in the C# Forum
- Previous Thread: how to add audio files to WinForms
- Next Thread: Sending Bitmap using WCF
Views: 354 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for C#
.net access algorithm array barchart bitmap box button buttons c# chat check checkbox class client code color combobox control conversion csharp custom database datagridview dataset datetime degrees draganddrop drawing encryption enum excel file files form format forms ftp function gdi+ httpwebrequest image index input install java label list listbox listener login mandelbrot math mouseclick mysql networking object operator oracle path photoshop picturebox pixelinversion post prime programming radians regex remote remoting resource richtextbox save saving serialization server sleep socket sql statistics stream string table tcp text textbox thread time timer treeview update usercontrol validation view visualstudio webbrowser windows winforms wpf xml






