Results 1 to 7 of 7

Thread: Loading A Graphic

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Posts
    332

    Loading A Graphic

    I am trying to create a program, which has a customizable user interface, therefore, I would like to know how can I save a picture chosen by the user for his/her background, and so that it can be loaded the next time the program is opened. Are there many ways through which i can do it? Could somebody tell me the easiest way i could do this as i am still a beginner, i hope things could be simplified. THanx.

  2. #2
    Hyperactive Member
    Join Date
    Feb 2001
    Posts
    421
    VB Code:
    1. Form1.Picture = LoadPicture("C:\MyPicture.bmp")

    And that changes Form1's background picture to whatever bitmap you choose.
    [vbcode]
    ' comment
    Rem remark
    [/vbcode]

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Posts
    332

    saving?

    WHat about saving the picture? SO that i can reload it the next time i open that same program...

  4. #4
    Addicted Member
    Join Date
    Aug 1999
    Posts
    164
    Do you want to "save the picture" or just "save the file path to the image"?

    If you just want to save the file path, then you can just write a quick .ini file.

    take care,
    shurijo
    -Shurijo

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Posts
    332

    which is better?

    Er........ok, if i save the picture, don't i need the path?
    sorry, i'm an amateur

    which do u think is better, with less hassle?

    at the least, the bottom line is to be able to allow the user to save his/her preferred background so it can be loaded nex time he/she starts the prog.

  6. #6
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    You should just save the path to the file.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  7. #7
    Addicted Member
    Join Date
    Aug 1999
    Posts
    164
    http://www.vb-world.net/files/tip17.html

    Here is a tutorial on how to use ini files to read and write to them.
    -Shurijo

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