hi all i wish to create a simple programe that does the following.

to be able to calculate the circumferance of any given circle and divide by chosen degrees over 360 degrees.

have tried simple programe by typing in the immediate window.

giving a radius of 10 as follows,and using the value of pi at 3.142

10*2* gives 20 * (3.142) = 62.84 /4= 15.71

the 15.71 is a quater of a circle 90degrees.

as i am using vb6 working vertion there is no help file included , so i am not sure quite what command /methode i would use to get (figures into my programe) and make the circle radius any size .


if there are simple examples or tutors please point me in the right direction ,

thank you

i

i

Are you looking for a way to format the ouput to a specific number of decimals? or to round to whole numbers?

lalo 3 decimal places would be ok say 16.564 for example

thank you

To format the output, use the format() function. The syntax is the following:

format([I]The number to be formatted[/I], "#.000")

The three zeros (you need the quotation marks) tell VB to include a zero instead of cutting it off.

So, applying this to your example, the syntax would be the following:

format(10 * 2 * 3.142, "#.000")

The output will be: 62.840

hi lalo i keep getting error messages when trying to input code,its obvious im doing something wrong.

i did however find a tutorial on www.funtionx.com under vb6 tutors after doing a search with google,that gives some guidence on forms etc and includes some examples on geometry ,

input etc , the fact that tutorial is in colour and a bit easier to see than trying to follow a book with small print is a bonus.

trying to find helpfiles on msdn is a bit of a nightmare

will spend sometime getting the basics correct .

thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.