Results 1 to 3 of 3

Thread: Picture box graph ???

  1. #1

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827

    Unhappy

    Hello guys!
    I am building a small math program. I have a picture box and I have drawn a graph on it but now I want to put a point on the center of the picture with a different colour. It does not work. It just makes the graph and that's it!
    Some help is needed!!!

    Here is the code:
    Dim i as long
    Dim j as long
    For i = 10 To Picture1.Width Step 10
    Picture1.Line (i, 0)-(i, Picture1.Height)

    Next
    For j = 10 To Picture1.Height Step 10
    Picture1.Line (0, j)-(Picture1.Width, j)
    Next

    Now I want to put a pixel in the center on the picture box like this:

    Picture1.PSet (Picture1.Width / 2, Picture1.Height / 2), _ vbBlue

    It makes the graph but does put the point.
    Baaaaaaaaah

  2. #2
    Guest
    Instead of using PSet, try this:
    Code:
    picture1.line(picture1.width / 2 + 10, picture1.height / 2 + 10)-(picture1.width / 2 - 10, picture1.height / 2 - 10, ,BF
    i think the reason your code doesnt work is because
    there are X number of twips in the width and height,
    but only so many pixels. If you try only setting 1 point
    to another color, it may not be able to show it, because
    it is so very small. Then again, that may not be the
    case. You may also want to try setting
    picture1.autoredraw = true..

  3. #3

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827

    Thumbs up thank

    Thanks!
    Baaaaaaaaah

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