Results 1 to 3 of 3

Thread: Setting Picture of cammand button

  1. #1

    Thread Starter
    Frenzied Member Blobby's Avatar
    Join Date
    Oct 2001
    Location
    England
    Posts
    1,512

    Setting Picture of cammand button

    I have a command button that is set to 'Style=Graphical' and it has the 'Picture' property set to an image on the hard drive. This is Ok, but how do i set the picture manually in the code to something else? Im doing this at the moment bit the compiler doesnt like it.

    VB Code:
    1. CommandExit.Picture = "C:\a.bmp"

    Do i have to use 'Set' instead or something? Thanx in advance
    There are 3 types of people in this world.........those that can count, and those that can't.

    Blobby

  2. #2
    Let me in .. techyspecy's Avatar
    Join Date
    Aug 2002
    Location
    Back to VBF.
    Posts
    2,456
    Use LoadPicture function instead of directly saying the path

    Command1.Picture = LoadPicture(FileName, etc, etc ....)

  3. #3

    Thread Starter
    Frenzied Member Blobby's Avatar
    Join Date
    Oct 2001
    Location
    England
    Posts
    1,512
    Thanks Techy! Knew it was something like that but wasnt sure of the exact syntax seeing as i havent done it b4. Full marks!
    There are 3 types of people in this world.........those that can count, and those that can't.

    Blobby

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