Original Post
🔒 Locked
Grids
Advertisement
Ok, you were a little vague, so I will help you as much as I can right now. First, chose the number of grid lines you want up and down the screen, then set the scalewidth and height of the container object you are using to that number. Whenever you create an object on the container use a grid the size of scale to place things...
got to go, come back later
If one person would write a book on DirectX in VB, I would make them a rich man!
got to go, come back later
If one person would write a book on DirectX in VB, I would make them a rich man!
In your form:
that should give you a 10x10 grid...
--- krez (krezisback@aol.com)
Private Const X_SQUARES = 10
Private Const Y_SQUARES = 10
Private gX as Single, gY as Single
Private Sub Form_Load()
gX = ScaleWidth / (X_SQUARES + 1)
gY = ScaleWidth / (Y_SQUARES + 1)
End Sub
Private Sub Form_Resize()
For t% = 0 to (X_SQUARES + 1)
Line(t% * gX, 0) - (t% * gX, ScaleHeight)
Next t%
For t% = 0 to (Y_SQUARES + 1)
Line(0, t% * gY) - (ScaleWidth, t% * gY)
Next t%
End Sub
that should give you a 10x10 grid...
--- krez (krezisback@aol.com)
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement