|
-
Nov 12th, 2001, 11:43 PM
#1
PowerPoster
Don't do that! 
Convert your scale mode for both the form and picture box to 3-Pixels. Twips are bloody gay. There is no visible change except for every 15 twips, which = 1 pixel. Why have a gay scale that doesn't do anything?
Anyway. Do that ^ and then add the following code to your MouseDown/DragDrop event or whatever (not Mouse_Click - it doesn't pass the X/Y parameters):
X = X - (X Mod 32)
Y = Y - (Y Mod 32)
This will snap the mouse position (X,Y) to the top-left corner of the grid square you click in. (I think this is what you want... am I right?)
Note : This is for a grid of 32x32 pixel squares. Change the 32 as you wish.
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|