-
Apr 12th, 2021, 08:32 PM
#1
Thread Starter
Junior Member
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?
-
Apr 12th, 2021, 08:38 PM
#2
Fanatic Member
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.
-
Apr 13th, 2021, 06:35 AM
#3
Re: The size of the radius of a circle
Originally Posted by mathprof
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).
-
Apr 13th, 2021, 10:11 AM
#4
Re: The size of the radius of a circle
Originally Posted by SamOscarBrown
... 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|