Need Save/Load Buttons

Discussion in 'Archives' started by Teizhcial, May 14, 2007.

Need Save/Load Buttons
  1. Unread #1 - May 14, 2007 at 8:52 PM
  2. Teizhcial
    Referrals:
    0

    Teizhcial Guest

    Need Save/Load Buttons

    i'm making a program. I added a menu with a button to save and open files. The thing is i dont know what the code is that i need to add to the save and open buttons. I know it uses a common dialog box, and that i need it to just save the program with all the changes made. I also know i need to add code (for the open button) that will let me open saved files.
     
  3. Unread #2 - May 14, 2007 at 9:30 PM
  4. Covey
    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Need Save/Load Buttons

    don't be lazy and use the search buttons.
     
  5. Unread #3 - May 15, 2007 at 12:25 AM
  6. Cody
    Joined:
    May 10, 2005
    Posts:
    3,052
    Referrals:
    5
    Sythe Gold:
    30

    Cody Grand Master
    Visual Basic Programmers

    Need Save/Load Buttons

    SaveSetting

    Look it up :)
     
  7. Unread #4 - May 15, 2007 at 2:48 AM
  8. Darthatron
    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    Need Save/Load Buttons

    as in saving text, images, settings or something else?
     
  9. Unread #5 - May 15, 2007 at 4:02 AM
  10. Covey
    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Need Save/Load Buttons

    saving text to a file.
    its something along these lines, this is off the top of my head and i doubt it will work:
    Code:
    Saving:
    open [filepath & name] for input as #1
        write #1, "hi"
    close #1
    
    Loading:
    dim shold as string
    open [filepath & name] for output as #1
        shold = lof(input) ' <---  won't work i forget how lof() works
    close #1
    i might have the input / output commands around the wrong way to, iunno
     
  11. Unread #6 - May 15, 2007 at 3:54 PM
  12. Teizhcial
    Referrals:
    0

    Teizhcial Guest

    Need Save/Load Buttons

    Sorry I just need them because a friend of mine needs them.
     
  13. Unread #7 - May 15, 2007 at 7:00 PM
  14. Teizhcial
    Referrals:
    0

    Teizhcial Guest

    Need Save/Load Buttons

    Also he said,

    i dont need text saved or anything like that. I need it to save changes made in the program. So lets say someone inserts a variable into one of the text boxes, i need to add a button that will save the program but with the changes added. I also need to add a button that will let me open the saved file once its saved that way i can edit the changes.
     
  15. Unread #8 - May 15, 2007 at 7:29 PM
  16. timk777
    Joined:
    Feb 19, 2007
    Posts:
    156
    Referrals:
    0
    Sythe Gold:
    0

    timk777 Active Member

    Need Save/Load Buttons

    Again, don't be lazy. Look for Saving with .ini's. =( Laziness ftl.
     
  17. Unread #9 - May 15, 2007 at 8:32 PM
  18. jdsfighter
    Joined:
    Jan 21, 2007
    Posts:
    603
    Referrals:
    0
    Sythe Gold:
    0

    jdsfighter Forum Addict
    Visual Basic Programmers

    Need Save/Load Buttons

    Use my favorite functions. Savesetting and getsetting.
     
  19. Unread #10 - May 17, 2007 at 8:20 PM
  20. meeman666
    Referrals:
    0

    meeman666 Guest

    Need Save/Load Buttons

    What would the code for a savesetting be like?:confused:
     
  21. Unread #11 - May 17, 2007 at 8:48 PM
  22. jdsfighter
    Joined:
    Jan 21, 2007
    Posts:
    603
    Referrals:
    0
    Sythe Gold:
    0

    jdsfighter Forum Addict
    Visual Basic Programmers

    Need Save/Load Buttons

    Savesetting
    Code:
    SaveSetting App.EXEName, "Options", "Name_Label", lblName.Caption
    Getsetting
    Code:
    lblName.Caption = GetSetting(App.EXEName, "Options", "Name_Label", "")
     
  23. Unread #12 - May 17, 2007 at 8:58 PM
  24. Purelustre
    Joined:
    May 17, 2007
    Posts:
    59
    Referrals:
    0
    Sythe Gold:
    0

    Purelustre Member
    Banned

    Need Save/Load Buttons

    ugh I'm having problems
     
  25. Unread #13 - May 17, 2007 at 8:59 PM
  26. meeman666
    Referrals:
    0

    meeman666 Guest

    Need Save/Load Buttons

    yes but when i do that it says object missing. Also is there a way to make it save out of a common dialog box?
     
  27. Unread #14 - May 18, 2007 at 2:30 AM
  28. Covey
    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Need Save/Load Buttons

    noone is going to help you unless you show initiative to help yourself.
    now either just the fuck up and die, or click on the fucking search button.
     
  29. Unread #15 - May 18, 2007 at 7:18 AM
  30. jdsfighter
    Joined:
    Jan 21, 2007
    Posts:
    603
    Referrals:
    0
    Sythe Gold:
    0

    jdsfighter Forum Addict
    Visual Basic Programmers

    Need Save/Load Buttons

    Replace lblName with your control name. Also replace caption to what ever applies to. Ex txtName.text, lblName.forcolor, txtName.Backcolor, etc.
     
  31. Unread #16 - May 18, 2007 at 3:21 PM
  32. meeman666
    Referrals:
    0

    meeman666 Guest

    Need Save/Load Buttons

    thanks,
    and covey:
    calm the hell down. Its not like i'm new to vb6, i've been using it a while now and i did use thesearch button at first so stop getting angry. Besides its just a question, and i do show initiative to learn. Thats the reason i'm asking how. So that i can learn how to do it.
     
< chad1's free MMing! | Need FireCaper and ToRsO >

Users viewing this thread
1 guest


 
 
Adblock breaks this site