Results 1 to 2 of 2

Thread: Minatures on a Grid - Ideas

  1. #1

    Thread Starter
    New Member Maximonium's Avatar
    Join Date
    Nov 2002
    Location
    Australia
    Posts
    2

    Minatures on a Grid - Ideas

    I have a PictureBox which has a Bitmap tiled across it and a Square Grid drawn onto it. From here the plan is to be able to load Sprites onto it that can be moved about with the mouse and that will snap to the grid.
    Also each sprite will have it's own properties and right clicking on it will bring up another dialog box for these properties to be edited.
    The last requirement of the miniatures is a name that is to be displyed centered underneath each of them.
    I was thinking of using a control array of PictureBoxes inside the Main PictureBox but I'm unsure about how to do much else .

    Thanks,
    Maximonium

  2. #2
    Hyperactive Member dogfish227's Avatar
    Join Date
    Oct 2002
    Location
    GA
    Posts
    409
    the control array of picture boxes is not a bad idea but if you have to many inyour array the program will run very slow consider useoing bitblt to draw all the picture into the one big picbox or if you dont want to do it that way consider useing the image control instead of the picture box the umage control takes up less computer power.

    if you do decide to do it useing bilblt to detec which picbox was clicked youd just have to take the X and Y from the mouseup property and then say somthing like

    boxclickedx = int(x / boxwidth)

    hope this helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width