Results 1 to 3 of 3

Thread: Drawing Program

  1. #1

    Thread Starter
    Frenzied Member toecutter's Avatar
    Join Date
    Apr 2006
    Location
    Brisbane, Australia
    Posts
    1,160

    Drawing Program

    I am trying to make a drawing program that will draw the wall layout in plan view of a building/house.

    Example


    I have started with a form with a panel on it.

    The part i am stuck on is scaling the wall lengths down to fit in the panel
    example
    If i draw a line that represents a wall at say 30000 millimeters which is 30 meters

    it will run off the screen so i need to scale it down somehow.

    Then i need to use the coordinates the user enters to draw a wall for the start x,y coordinates of the next wall and so on and so on.

    So is anybody interested in helping me with this program?

    I can attach what i have but not sure what to attach as i believe we don't attach all the projects files..

    regards

    toe
    Attached Files Attached Files
    Last edited by toecutter; Apr 26th, 2008 at 10:05 PM.

  2. #2
    Junior Member
    Join Date
    Apr 2008
    Posts
    18

    Re: Drawing Program

    I am interested. You will have to attach all the equivalent parts which are about drawing these walls. Best would be to attach whole main program.

  3. #3
    Junior Member
    Join Date
    Apr 2008
    Posts
    18

    Re: Drawing Program

    But I have no way of seeing this source code. I would need it to be written in vb6 or earlier. I don't use vbnet.

    In a program written in vb6, for a model drawn to a Form, this should look something like this :

    ' Here comes input of the Y wall coordinate and its lenght on the Y axis, and then...

    'assuming a new wall begins in the Y coordinate and heads down

    If Y(wall) + Ylength(wall) > Form.height and Y(wall) <= Form.height then
    num1 = ( Y(wall) + Ylength(wall) ) / Form.height
    for everywall = 1 to number_of_walls
    y(everywall) = y(everywall) / num1
    ylenght(everywall) = ylenght(everywall) / num1
    next everywall
    end if

    'assuming a new wall begins in the Y coordinate and heads up

    If Y(wall) > Form.height and Y(wall) + Ylength(wall) <= Form.height then
    num1 = Y(wall) / Form.height
    for everywall = 1 to number_of_walls
    y(everywall) = y(everywall) / num1
    ylenght(everywall) = ylenght(everywall) / num1
    next everywall
    end if

    ' walls don't have to head straight up or straight down

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