Results 1 to 3 of 3

Thread: draw

  1. #1
    Join Date
    Jun 2004
    Posts
    23

    Unanswered: draw

    I can generate a X and Y coordinates to the notepad .. which read like this ..

    x=2880 y = 2055

    If i click on another button, i want it to draw a square with that given coordinates. If i'm not wrong i have to use an input isn't it?

    But how am i suppose to do it??

  2. #2
    Join Date
    Nov 2004
    Posts
    108

    Question is this for a class

    try using a picture box and a square shape
    on the click event you get the coordinates
    and when the command button is clicked
    you create the shape something like
    Code:
    load myShape(i)
    myShape(i).top = y
    myShape(i).left = x
    myShape(i).visible = true
    Last edited by tuenty; 12-03-04 at 11:17.
    to err is human ; to really mess things up requires a computer

  3. #3
    Join Date
    Nov 2004
    Posts
    108

    mouse down and mouse up

    or use the mouse down and mouse up events with no command button
    on mouse down store x1 and y1
    on mouse up store load the new shape (square) with top and left equal to y1 and x1 and set the heiht and width to the absolute difference between current coordinates and y1 and x1
    to err is human ; to really mess things up requires a computer

Posting Permissions

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