Results 1 to 3 of 3

Thread: Print in pictureboxes??

  1. #1

    Thread Starter
    Hyperactive Member Libero's Avatar
    Join Date
    Jun 2000
    Location
    Swedish viking
    Posts
    460

    Print in pictureboxes??

    How can i set where the coordinates where i want a string in the picturebox??

    X1 = (Int((100* Rnd) + 1)) ' Value of the graph
    Y1 = 5
    X2 = 0
    Y2 = Y1 + 5
    Picture1.Line (X1, Y1)-(X2, Y2), QBColor(Int((7 * Rnd) + 1)), BF
    Picture1.Print (X1); "Hello world"

    I want the "Hello world" to be printed where the x1 ends.

  2. #2
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    Code:
    CurrentX, CurrentY Properties
    
    Return or set the horizontal (CurrentX) or vertical (CurrentY) coordinates for the next printing or drawing method. Not available atdesign time.
    
    Syntax
    
    object.CurrentX [= x]
    object.CurrentY [= y]
    
    The CurrentX and CurrentY properties syntax have these parts:
    
    Part Description 
    Object Anobject expression that evaluates to an object in the Applies To list. 
    X A number that specifies the horizontal coordinate. 
    Y A number that specifies the vertical coordinate. 
    
    
    Remarks
    
    Coordinates are measured from the upper-left corner of an object. The CurrentX property setting is 0 at an object's left edge, and the CurrentY property setting is 0 at its top edge. Coordinates are expressed intwips, or the current unit of measurement defined by the ScaleHeight, ScaleWidth, ScaleLeft, ScaleTop, and ScaleMode properties.
    
    When you use the followinggraphics methods, the CurrentX and CurrentY settings are changed as indicated:
    
    This method Sets CurrentX, CurrentY to 
    Circle The center of the object. 
    Cls 0, 0. 
    EndDoc 0, 0. 
    Line The end point of the line. 
    NewPage 0, 0. 
    Print The next print position. 
    Pset The point drawn.
    So use:
    VB Code:
    1. picPicture.CurrentX = value
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  3. #3

    Thread Starter
    Hyperactive Member Libero's Avatar
    Join Date
    Jun 2000
    Location
    Swedish viking
    Posts
    460
    Thanx Alot!! That was exactlthe code i needed. Thanks again.

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