Advertisement

02.06.2007 at 09:16AM PST, ID: 22151601
[x]
Attachment Details

Need to draw a line, depending on the value of an angle. Using VB6 Line Metod in the back of the form

Asked by lazario in Miscellaneous Programming

Tags: line, vb6, draw

Hello, I need to draw a short line, I am doing this with visual basic Line Method, I have no problem drawing the line in diffrent postions, lenghts, etc.

My problem is that I need to locate the line related to an angle value ( input by the user ) range 0 to 180°.

The line will be draw inside a circle, like a clock i.e. 90° will be at twelve o'clock, if the user type 90° I need to draw an horizontal line under the number twelve of the clock, if he write 180° I have to draw a line, under the number three of the clock.

I have tried some things, but I am missing how to move x1,y1, x2, y2 all together depending on the angle.

You can see an example of the graphics here:

http://www.softvirtual.com.ar/experts/90.jpg
http://www.softvirtual.com.ar/experts/180.jpg

i.e. for 180° this are the values for the line:

parForm.Line (X1, Y1)-(X2, Y2)

X1  =  12792,00   /   Y1 =  6890  

 X2 = 12792,0 /    Y2 = 6355

Thank you

Start Free Trial
 
Loading Advertisement...
 
[+][-]02.06.2007 at 10:03AM PST, ID: 18478193

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.06.2007 at 10:33AM PST, ID: 18478484

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.06.2007 at 10:47AM PST, ID: 18478616

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.06.2007 at 11:00AM PST, ID: 18478744

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Miscellaneous Programming
Tags: line, vb6, draw
Sign Up Now!
Solution Provided By: wwfarch
Participating Experts: 1
Solution Grade: A
 
 
[+][-]02.06.2007 at 11:01AM PST, ID: 18478753

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.08.2007 at 11:09AM PST, ID: 18681705

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]03.13.2007 at 08:28PM PDT, ID: 18715855

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32