Results 1 to 3 of 3

Thread: Draw MultiArray On PictureBox

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2001
    Posts
    217

    Draw MultiArray On PictureBox

    Is there a quick way to draw a multidimension array of integers onto a picturebox in text. Like draw the text?

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    I havent tested this but I think its along the right lines...

    VB Code:
    1. Sub DrawMultiArray()
    2.  
    3. dim i, j as integer
    4. dim gx as graphics = myPicBox.CreateGraphics()
    5.  
    6. for i = 0 to 100
    7. for j = 0 to 100
    8. gx.DrawString(MyArray(i,j).ToString(), new Drawing.Font("Courier New", 12),  Brushes.Black, PointF((10 * j), (10 * i)));
    9. next j
    10. next i
    11. End Sub

    You'll have to alter the 0 to 100 values and (10 * i) and a few other bits maybe. Its not optimised either but thats not hard.
    Last edited by wossname; Nov 20th, 2003 at 07:04 AM.
    I don't live here any more.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Feb 2001
    Posts
    217
    ty!

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