1 Replies - 181 Views - Last Post: 06 December 2017 - 12:52 PM Rate Topic: -----

#1 VBsfan   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 06-December 17

Grid and snap on a form

Posted 06 December 2017 - 12:50 PM

Hi there,

1. How do you generate grid dots on a form, say by pressing a button?

2. How do you create snapping function in order to snap, say mouse pointer, to the grid?


Thanks

View PostVBsfan, on 06 December 2017 - 12:46 PM, said:

Hi there,

1. How do you generate grid dots on a form, say by pressing a button?

2. How do you create snapping function in order to snap, say mouse pointer, to the grid?


Thanks



I do not mean turning on/off grid or snap in visual studio. I mean how do you create for your own application. Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: Grid and snap on a form

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14151
  • View blog
  • Posts: 56,735
  • Joined: 12-June 08

Re: Grid and snap on a form

Posted 06 December 2017 - 12:52 PM

You can draw lines using the graphics object from the 'paint' event of the form. Dashed too!
https://msdn.microso...(v=vs.110).aspx

Snapping could be done through a use of knowing the standard grid size and figuring out what 'snap' means to your app.. so if it is a closeness.. a hesitation on the line.. etc.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1