Results 1 to 8 of 8

Thread: picturebox

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 1999
    Location
    France
    Posts
    90


    How can I position characters in my picturebox? Is using CurrentX and Current Y the only way?

    Thanks for any help!

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    You could put a label inside the picture box
    and write to the label.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3
    Guest
    Without using a Label, yes, CurrentX and CurrentY are the only ways, but if you do not want to use them, you can add blank spaces before your word. For example " Hello".
    Also, when working with Character's, it's a good idea to set the ScaleMode to Character.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Feb 1999
    Location
    France
    Posts
    90

    What a pity that CurrentX and CurrentY is the only way. Hopefully this will change in future releases of VB (who could I suggest this to?).

    I have lots of text and symbols have to be inserted after each sentence, so it looks like I'll have to get the coordinates where each sentence ends, insert the symbol at that point, blah, blah, blah.....

    Megatron, why is it a good idea to set scalemode to 'Character'? What difference does it make?

    Thanks.

  5. #5
    Guest
    It makes it easier because it's about the width of a character. So instead of talking in terms of twips (120's 240), you talk in terms of 1's and 2's.

  6. #6
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    If you Put a semicolon after the Print Statement the Currentx and CurrentY properties are automaticly set to the end of the Statement you Print

    For example

    Code:
    Picture1.Print "Hello "
    Picture1.Print "Everyone"
    Prints

    Hello
    Everyone

    Code:
    Picture1.Print "Hello ";
    Picture1.Print "Everyone"
    Prints

    Hello Everyone


  7. #7
    Guest
    But there are some occasions where you do not want to print directly to the next line or end of the statement. If that is the case, setting the ScaleMode to Character will help greatly.

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Feb 1999
    Location
    France
    Posts
    90

    Talking


    Thanks both for your help,

    Sam, that is exactly what I am looking for. Thanks a lot. From now on life is different.

    I was not looking forward to having to place every single symbol individually - and then if we decide to change the hints, the nightmare starts again, as we have to reposition every symbol. With this, the picture box can do everything.

    It also eradicates the 'random' problem, because some numbers can be 1, 100, 2000 etc, and if you position it with currentX and currentY you can get overlaps.

    The way to go:

    Private Sub Command1_Click()
    Dim anynumber As Integer
    Randomize
    anynumber = Int(Rnd * 2000)
    Picture1.Print "yada yada " & anynumber & " ";
    Picture1.Font = "symbol"
    Picture1.Print "Ð"
    Picture1.Font = "comic sans ms"
    End Sub

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