Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Visual Basic Sectors?

I'm having issues drawing a sector. I want to draw the bottom half of a circle, from pi to 0.

Here's the code that's not working for me:

Circle (130, 345), 10, , -pi, (-0.0001)

It's drawing a line, and not the semi-circle.

It's my first class with Visual Basic, we're supposed to keep it simple.

Thanks!

Update:

Aamir- we're supposed to keep it simple and use the Circle command.

2 Answers

Relevance
  • Anonymous
    1 decade ago
    Favorite Answer

    Drawing a semi-circle:

    -> Make a label on your form, name it: lblDrawing

    -> Set the label's Autosize property to false (on the right properties toolbar, look for 'autosize' and set to false)

    -> Now make the label very big on the form!! (now that you can change the size of the label)

    -> Add a button to your form, name it anything!

    -> Double-click on your button and put in this code:

    Dim formSurface As Graphics = Me.lblDrawing.CreateGraphics

    formSurface.FillPie(Brushes.Black, 50, 50, 50, 50, 0, -180)

    What version of vb are you using?? The Circle command is not present in Vb 2008, Ellipse is used instead.

    -> Now run your program =)

    and ask me if you got any problems: aamir_raza60@hotmail.com

    Source(s): Me...
  • simo
    Lv 4
    4 years ago

    seen common is an interface application, and extremely sturdy for gamnes or small purposes. seen c is amazingly sturdy for controlling hardware and mechanical units. yet whilst u communicate approximately turning out to be a programmer, then usualy the shoppers needs u to lead them to database classes, for that u ought to leran sq., any sq. will do oracle (PL-sq.), ms sq., etc u can use database application the sq. with seen common or seen c to alter right into a sturdy programmer. remember avery agency has it very own prference approximately programers, some will use oracle, different ms-sq. and a few would desire unix or lunix. so purely persist with one

Still have questions? Get your answers by asking now.