1 Replies - 523 Views - Last Post: 07 September 2016 - 02:50 PM Rate Topic: -----

#1 Jeff_the_creator  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 07-September 16

Making multi-select Grid lines over a picture first project

Posted 07 September 2016 - 10:03 AM

Hello all first i want to say i'm extremely new to VB.net programming and am trying to make the hop over from VBA and SQL so please stay with with me if i sound like a Dumba**.

Anyways so as my first project dabbling in this new side of programming i'm trying to make what I'm going to call a "damage tracker." I'm trying to build a system that will allow a user to go in a page, click on certain areas of a picture, and submit for documentation that will then track their selection (or selections) in which the damage is noticed.

I was thinking about loading a background picture on the page and overlaying some kind of grid system that would allow users to select the coordinate which the damage is noticed and submit a record of damage before rework.

My Question is more on the side that i am seeking advice on how i should approach this and if the grid system i speak of is possible. I attached a photo of an example of what i am thinking of having this grid system look like with red fills as example selected areas.

Thanks and I would absolutely appreciate your advice!!

Attached image(s)

  • Attached Image

This post has been edited by andrewsw: 07 September 2016 - 10:23 AM
Reason for edit:: Removed VB.NET from topic title, it is redundant


Is This A Good Question/Topic? 0
  • +

Replies To: Making multi-select Grid lines over a picture first project

#2 andrewsw  Icon User is offline

  • lashings of ginger beer
  • member icon

Reputation: 6340
  • View blog
  • Posts: 25,562
  • Joined: 12-December 12

Re: Making multi-select Grid lines over a picture first project

Posted 07 September 2016 - 02:50 PM

This isn't my area of expertise, but you could use the System.Drawing namespace to draw the image on the form, then draw the grid, using lines (or rectangles, if you fancy a challenge ;) ). In the Click event of the form you can use simple arithmetic to work out which box they clicked in.

Graphics Class

You could set the image as the background to the form, and draw the grid onto it, but, presumably, you might want to add a control or two on the form as well. Alternatively, you could draw in a Panel.



I suppose an interesting idea is to use a TableLayoutPanel for the grid, which could expand and contract with the form, but you could achieve the same effect in the Paint event with the drawn grid. Either way, if allowing resizing of the form (and the grid) you'd have to recalculate positioning.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1