Results 1 to 3 of 3

Thread: Command1.picture= ?

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2002
    Location
    amsterdam
    Posts
    6

    Command1.picture= ?

    How do I assign a picture to a CommandBttn at run time.
    At design time it's no problem, but at runtime it is.

    Command1.picture=App.path + "\xxxx.jpg" gives a type mismatch
    error.
    VB does not accept a string in this matter.

    does anybody know???

    Thanks beforehand.

    Thmwij.

  2. #2
    Frenzied Member MerrionComputin's Avatar
    Join Date
    Apr 2001
    Location
    Dublin, Ireland
    Posts
    1,616
    Code:
    Set Command1.Picture = LoadPicture("xxx.jpg")
    HTH,
    Duncan
    ----8<---------------------------------------
    NEW - The .NET printer queue monitor component
    ----8<---------------------------------------
    Now with Examples of use

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    VB Code:
    1. 'Note:   make sure the button style is set to graphical
    2. Command1.Picture = LoadPicture(App.Path & "\xxx.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