CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    Help with Paintpicture method

    I want to use the paintpicture method but vb is giving me errors. What is wrong with this statement? When I run it, vb says "expected variable or function". Why is this? Is there a better way to output graphics?

    Picture1.PaintPicture(PictureClip1.GraphicCell(W), 2, 3)

    Thanks.

    [email protected]


  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Help with Paintpicture method

    In this statement

    Picture1.PaintPicture(PictureClip1.GraphicCell(W), 2, 3)

    vb will interpret paintpicture as a function, not a sub. A function however requires a return value. My advise is to remove the braces () from the paintpicture.

    So:
    Picture1.PaintPicture(PictureClip1.GraphicCell(W), 2, 3)
    should be changed into
    Picture1.PaintPicture PictureClip1.GraphicCell(W), 2, 3


    Tom Cannaerts
    [email protected]

    The best way to escape a problem, is to solve it.
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

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

Featured