Results 1 to 9 of 9

Thread: [RESOLVED] Question about saving a form

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Resolved [RESOLVED] Question about saving a form

    Whenever you save a form, dose it save the pictures that are in the form to? Like if i had a picture of sonic on the form (using the image control) would it save the picture property of that image onto that form, so if i give it to another person, it will load that image?

  2. #2
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Question about saving a form

    I think, it is true...
    Form1.frx this file will contain the data....

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  3. #3
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Question about saving a form

    But using that method is not good... Because, it will increase the file size...

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Question about saving a form

    ok. Would that method be bigger than sending just the form and the pic with it sepertatly? and to do that method, do you select the form, go to file, then select save *frm as...?

  5. #5
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Question about saving a form

    You can send the files separately.... Then, load the picture at runtime using loadpicture()...

    Example:
    Code:
    Private Sub Form_Load()
    Me.Picture = LoadPicture(App.Path & "\pic.jpg")
    End Sub

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  6. #6
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Question about saving a form

    Pictures loaded into controls/forms during design time are saved with the project. Pictures loaded at runtime are not.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Re: Question about saving a form

    ok. so your saying that whenever i save a project, it saves the pictures also? So if i upload a project, i dont need to upload the pics to? Just the project?

  8. #8
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Question about saving a form

    If the pictures were added via Properties during design time, yes.

    Just bear in mind that the project includes several files - the .vbp file, .frm files (and the .frx file with the same name), .bas file, .cls files, etc.

  9. #9
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Question about saving a form

    Quote Originally Posted by Gamemaster1494 View Post
    ok. so your saying that whenever i save a project, it saves the pictures also? So if i upload a project, i dont need to upload the pics to? Just the project?
    Yes, just to educate you a tad more.

    For forms, there is a .frx file along with the .frm file when pictures and other data is saved with the project. In your case, the pictures are stored in the .frx file. So as long as you don't lose the .frx file, you don't lose the images. The images are actually compiled into the project.

    Other VB objects have such binary sister objects too:
    UserControls (.ctl) files have a .ctx
    PropertyPages (.pag) files have a .pgx
    Designers (.dsr) files hava a .dsx

    Notes:

    1. This binary sister file won't always exist. It is created as needed by VB.

    2. You shouldn't just upload the .exe project either. You should create a setup.exe file with VB's Package & Deployment Wizard or other installation apps, then upload that instead.

    3. Usage of Resource files allows you to store any types of files with your project. Resource files have their own functions for extracting the stored information.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

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