|
-
Feb 3rd, 2001, 09:04 PM
#1
Thread Starter
PowerPoster
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.
-
Feb 3rd, 2001, 09:55 PM
#2
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..
-
Feb 4th, 2001, 11:46 AM
#3
Thread Starter
PowerPoster
thank
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
|