Hello,
I have developed the project that allows the user to draw the diagrams like house outline , garagoutline etc.. on the picture box.
I save the co-ordinates of the house into the access database and while he is drawing it is saved into the collection and the mousedown event has allthe code to determine what x,y co-ordinate user has clicked on &so forth.
But now I want to do two things : a) After the first outline of the house is drawn the flag is set - HouseIsReady = true , now I don't want the user to be able to draw beyond the outlines of the house.
b) How do I calculate the area of the house outline and determine that user is trying to draw outside of the house outline. I have data stored in the x,y co-ordintes.
For example following is the house outline drawn on the
picture box , I don't want if the user cilcks on the out side of the outline anything should happen (It means i want to set some flag that will be checked inthe mouse down event and it will not execute the code in that event).
I don't know how to calculate the area of the house outline and code for it and how to determine in the mouse down event that user is clicking on the area beyond the outline.
___________________________
| |
| ------
| |
|_________________________________|
The above lines are actually line, these are not dash lines in the code.
Please help.
I have developed the project that allows the user to draw the diagrams like house outline , garagoutline etc.. on the picture box.
I save the co-ordinates of the house into the access database and while he is drawing it is saved into the collection and the mousedown event has allthe code to determine what x,y co-ordinate user has clicked on &so forth.
But now I want to do two things : a) After the first outline of the house is drawn the flag is set - HouseIsReady = true , now I don't want the user to be able to draw beyond the outlines of the house.
b) How do I calculate the area of the house outline and determine that user is trying to draw outside of the house outline. I have data stored in the x,y co-ordintes.
For example following is the house outline drawn on the
picture box , I don't want if the user cilcks on the out side of the outline anything should happen (It means i want to set some flag that will be checked inthe mouse down event and it will not execute the code in that event).
I don't know how to calculate the area of the house outline and code for it and how to determine in the mouse down event that user is clicking on the area beyond the outline.
___________________________
| |
| ------
| |
|_________________________________|
The above lines are actually line, these are not dash lines in the code.
Please help.