Results 1 to 4 of 4

Thread: The size of the radius of a circle

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2000
    Location
    ny
    Posts
    26

    The size of the radius of a circle

    I'm having difficulty with sizing the radius of a circle on a form. On the form that I am working with now when I set radius = 0.3 it is exactly what the circle that I want looks like. My question is, what parameter of the form can I use instead of using 0.3. Because, as I try to code the radius of another form, 0.3 is not the same as 0.3 as my current form.
    What formula can I use for the radius of any circle for relating it to something else on that form?

  2. #2
    Fanatic Member
    Join Date
    Feb 2017
    Posts
    858

    Re: The size of the radius of a circle

    VB's circle formula should adapt for the interior scaling (ScaleWidth, ScaleHeight)
    of the Form automatically. SO radius = 0.3 should be the same no matter what size you draw the form.

  3. #3
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    Re: The size of the radius of a circle

    Quote Originally Posted by mathprof View Post
    Because, as I try to code the radius of another form, 0.3 is not the same as 0.3 as my current form.
    What formula can I use for the radius of any circle for relating it to something else on that form?
    Huh? I haven't the slightest idea what your problem is. Are you talking about two CIRCLES, one on each of two different forms (instead of the 'radius of another form)? If so, what do you mean by 'relating it to something else on that form'?

    A sample of your issue would help me to understand...maybe your project, or a scaled down one with your same issue.
    Sam I am (as well as Confused at times).

  4. #4
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,219

    Re: The size of the radius of a circle

    Quote Originally Posted by SamOscarBrown View Post
    ... I haven't the slightest idea what your problem is.
    I think, on the Form where it works, he has a userdefined Scalemode of (0,0)-(1,1).

    Here is an example, how to ensure the User-Scalemode explicitely (by hand) -
    so this should work on "any Form you copy the Resize-Event to":
    Code:
    Option Explicit
    
    Private Sub Form_Resize()
      AutoRedraw = True: Cls
      Scale (0, 0)-(1, 1) '<- an explicitely userdefined Scale-CoordSys (between 0,0 TopLeft and 1,1 BottomRight)
      Circle (0.5, 0.5), 0.3, vbRed
    End Sub
    HTH

    Olaf

Tags for this Thread

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