Results 1 to 2 of 2

Thread: setting a Property on runtime!

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    1

    setting a Property on runtime!

    Hi

    I have a very basic question and after googling I'm posting it here.. hopefully you ppl will help me as this is my first post here.

    In VB6 I created a simple data report using designer

    I added a RptImage control to the report.. RptImage1 is taking picture's absolute path, whereas the program will be installed on remote location on different path may be so the picture will not found on run time..

    My question here is :

    is it possible to set the value of picture property of RptImage on runtime.
    OR i can do something like relative path..... RptImage.Picture = App.path & ("Images\Picture.jpg")

    Regards

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: setting a Property on runtime!

    You can set the Picture property using the LoadPicture function

    Set DataReport1.Sections("Section2").Controls("Image1").Picture = LoadPicture(App.path & "\Images\Picture.jpg")

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