Results 1 to 3 of 3

Thread: Add labels at runtime to an Elliptic Form

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    14

    Add labels at runtime to an Elliptic Form

    I have created a form using the CreateEllipticRgn Api.

    I would like to add labels to this form at runtime if possible.

    The code I have at the moment for the labels is
    sub add_labels
    dim cx as long, cy as long
    dim i as integer
    const deg as single = 0.01744
    dim a as single
    n=20
    a=(360/n*deg)
    cx=frmbull.scalewidth/2
    cy=frmbull.scaleheight/2
    for i = 1 to 20
    if i > 0 then load lblBull(i)
    lblBull(i).move cnt(cx+cx*sin(i*a)),cint(cy-cy*cos(i*a))
    lblBull(i).visible=true
    for each label in lblBull
    with lblBull(i)
    .fontsize = 18
    .forecolor = vbblack
    end sub

    This code works on an ordinary form by placing the labels in a circle, however, this is not the desired effect.
    If I divide the move formula by 2 then the labels are visible on the form but are more to the middle than the edge.
    Cheers
    Rab.
    Rab.

  2. #2
    grantfrench
    Guest

    Question

    Can i just clarify, you can load new labels at runtime fine, you just cant get them in the center of the shaped form?

    Grant French
    [email protected]

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    14
    The labels are loaded and can be seen if the formula is divided by 2 in the centre of the form

    It is around the outer edge of the form I wish the labels to be displayed similar to a clock face.

    I have been able to place the labels in this fashion but it took alot of hard coding - and I figure if I can keep them in an array using the code presented they will be easier to control.


    Hope this makes clarifys things.

    Rab.
    Rab.

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