Page 3 of 3 FirstFirst 123
Results 81 to 100 of 100

Thread: [RESOLVED] How to Save classes to binary file vb6

  1. #81
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: [RESOLVED] How to Save classes to binary file vb6

    Too bad you had to purchase, I'm sure with all the code online and our help you could of free similar (if not the same) commandbuttons (or .ocx). I'm sure Olaf could of hooked you up with something nice with his vbrichclient5.
    But now the ocx are yours I guess

    Well that's good that you are modifying to your needs, as long as you know what to change or not to change.
    Since I have your project too (the one you deleted) I can still help you with some subs/functions as I know how your program is built (well most of it).

  2. #82

    Thread Starter
    PowerPoster isnoend07's Avatar
    Join Date
    Feb 2007
    Posts
    3,237

    Re: [RESOLVED] How to Save classes to binary file vb6

    Quote Originally Posted by Max187Boucher View Post
    Too bad you had to purchase, I'm sure with all the code online and our help you could of free similar (if not the same) commandbuttons (or .ocx). I'm sure Olaf could of hooked you up with something nice with his vbrichclient5.
    But now the ocx are yours I guess

    Well that's good that you are modifying to your needs, as long as you know what to change or not to change.
    Since I have your project too (the one you deleted) I can still help you with some subs/functions as I know how your program is built (well most of it).
    Back when i bought the button ocx 7 yrs ago it would have been a real bad adventure to create. I am an expert now in comparison to then
    Like you compared to me
    Waiting for a full featured smart phone with out marrying a provider
    Go Android
    Go raiders

  3. #83

    Thread Starter
    PowerPoster isnoend07's Avatar
    Join Date
    Feb 2007
    Posts
    3,237

    Re: [RESOLVED] How to Save classes to binary file vb6

    Quote Originally Posted by Max187Boucher View Post
    Too bad you had to purchase, I'm sure with all the code online and our help you could of free similar (if not the same) commandbuttons (or .ocx). I'm sure Olaf could of hooked you up with something nice with his vbrichclient5.
    But now the ocx are yours I guess

    Well that's good that you are modifying to your needs, as long as you know what to change or not to change.
    Since I have your project too (the one you deleted) I can still help you with some subs/functions as I know how your program is built (well most of it).
    could not recreate the problem either in the one i am coding or the one you supplied
    so it must have something to do with what i have done.
    I have done stuff like added error handlers, prompted for dirty, removed the add button added it to save
    Code to check if name field is blank and user click save they are prompted and no save occurs
    also mbSaveFailed in case disk is full or ?
    so i have decided to copy the code i have written to text file and it to yours carefully
    Waiting for a full featured smart phone with out marrying a provider
    Go Android
    Go raiders

  4. #84
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: [RESOLVED] How to Save classes to binary file vb6

    I'm glad that it's working and that you are adding/editing what you need.
    You understand how I programmed it better by now
    I won't be too much on the computer for a couple days but I always have my phone so I'll keep checking in case you need help.

    You might of added one with empty info and didnt see or realize before reopening it

  5. #85

    Thread Starter
    PowerPoster isnoend07's Avatar
    Join Date
    Feb 2007
    Posts
    3,237

    Re: [RESOLVED] How to Save classes to binary file vb6

    Quote Originally Posted by isnoend07 View Post
    In testing the app i noticed that last row in the Phone grid does not save or does save and does not get it back poroperly
    The rest of the rows save properly. its just the bottom row. Do you know what could cause this?
    In testing the app i noticed that last row in the Phone grid does not save or does save and does not get it back poroperly
    The rest of the rows save properly. its just the bottom row. Do you know what could cause this?
    Waiting for a full featured smart phone with out marrying a provider
    Go Android
    Go raiders

  6. #86
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: [RESOLVED] How to Save classes to binary file vb6

    When i test it I can't reproduce the error, not sure what is causing it.

    I added my lastest version of the project, maybe I changed something which I don't think but anyways try to reproduce with this one. It saves/opens properly everytime for me.
    Attached Files Attached Files
    Last edited by Max187Boucher; Sep 9th, 2014 at 10:54 PM.

  7. #87

    Thread Starter
    PowerPoster isnoend07's Avatar
    Join Date
    Feb 2007
    Posts
    3,237

    Re: [RESOLVED] How to Save classes to binary file vb6

    Quote Originally Posted by Max187Boucher View Post
    When i test it I can't reproduce the error, not sure what is causing it.

    I added my lastest version of the project, maybe I changed something which I don't think but anyways try to reproduce with this one. It saves/opens properly everytime for me.
    I see the problem the previous version update5 had 6 rows in the phone grid and the one you just posted has 5 rows
    Waiting for a full featured smart phone with out marrying a provider
    Go Android
    Go raiders

  8. #88
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: [RESOLVED] How to Save classes to binary file vb6

    Messing around with it I found out something that you might have done.

    While editing the last number I left the txtedit focused (not validating it) and then clicked save and it did not save the last number

    To fix this issue, you could add this to the save function

    Code:
    Private Function SaveToFile()
    Dim FF As Integer
      
        FlxGrd(GridClicked).TextMatrix(GridSelRow, GridSelCol) = txtEdit.Text
        txtEdit.Visible = False
        
        If CurrentCompany > -1 Then

  9. #89

    Thread Starter
    PowerPoster isnoend07's Avatar
    Join Date
    Feb 2007
    Posts
    3,237

    Re: [RESOLVED] How to Save classes to binary file vb6

    Quote Originally Posted by isnoend07 View Post
    I see the problem the previous version update5 had 6 rows in the phone grid and the one you just posted has 5 rows
    I think i may have added the 6th row to make the grids tops equal.
    I think that adding a field to the udt may fix the problem
    Private Type Phone_UDT
    Cell As String
    Office As String
    Emergency As String
    Fax As String
    Owner As String
    BottomRow as string
    End Type
    what do you think ?
    Waiting for a full featured smart phone with out marrying a provider
    Go Android
    Go raiders

  10. #90
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: [RESOLVED] How to Save classes to binary file vb6

    Oh ok, your saving a 6th number? Well then yes you would need to make the udt bigger like you showed in the previous post. Remember that you'll have to change the load/save functions and populate to make sure it saves and loads it properly though.

  11. #91

    Thread Starter
    PowerPoster isnoend07's Avatar
    Join Date
    Feb 2007
    Posts
    3,237

    Re: [RESOLVED] How to Save classes to binary file vb6

    Quote Originally Posted by Max187Boucher View Post
    Oh ok, your saving a 6th number? Well then yes you would need to make the udt bigger like you showed in the previous post. Remember that you'll have to change the load/save functions and populate to make sure it saves and loads it properly though.
    Few yrs ago i had a udt in a project and found that trying to make some different fields, files saved with old udt would no longer open correctly.
    As a work around i made a new udt with some extra unused fields eg; FutureUse1 as string, FutureUse2 as string. then depending on the exe version which udt was determined.
    I am thinking of doing this to both udt's phones, tasks in case i wanted to make more rows
    what do you think ?
    Waiting for a full featured smart phone with out marrying a provider
    Go Android
    Go raiders

  12. #92
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: [RESOLVED] How to Save classes to binary file vb6

    Yes i forgot to tell you that it will mess up your saved file, unless you make a function to open the old file (with old udt) then load it into new udt and save you wont loose your saved information.

    It is a good idea to add extra udt variables for the future.

  13. #93

    Thread Starter
    PowerPoster isnoend07's Avatar
    Join Date
    Feb 2007
    Posts
    3,237

    Re: [RESOLVED] How to Save classes to binary file vb6

    Quote Originally Posted by Max187Boucher View Post
    Yes i forgot to tell you that it will mess up your saved file, unless you make a function to open the old file (with old udt) then load it into new udt and save you wont loose your saved information.

    It is a good idea to add extra udt variables for the future.
    Some thoughts/advice on modification
    Seeing this project is still under development I had a thought. What if a homeowner wanted to save roofing bids then get bids on something else or even at the same time
    eg; Kitchen remodel, landscaping, fencing or just about anything. Thoughts on a method to modify this project where the homeowner
    could select a category or ? and show bids for that category,
    maybe a combobox or ?
    Would this be possible ?
    Waiting for a full featured smart phone with out marrying a provider
    Go Android
    Go raiders

  14. #94
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: [RESOLVED] How to Save classes to binary file vb6

    Yes it could be possible, we would need to modify the user-interface a bit and the udt(s). You'd have to give me more information on what and how you want it to look/have.

  15. #95

    Thread Starter
    PowerPoster isnoend07's Avatar
    Join Date
    Feb 2007
    Posts
    3,237

    Re: [RESOLVED] How to Save classes to binary file vb6

    Quote Originally Posted by Max187Boucher View Post
    Yes it could be possible, we would need to modify the user-interface a bit and the udt(s). You'd have to give me more information on what and how you want it to look/have.
    Thanks for your reply
    Good need to give it more thought.
    Some initial thoughts
    Replace the name textbox with a combo box that can be typed into
    If I did away with squares textbox and the squares in main flexgrid, then everything would be the same.
    If the owner wanted the squares they could put into notes.
    I have made the notes textbox visible if it contains text when the user clicks a name, its position is also saved to an ini file
    My initial thought is to limit the number of category's entered into the combo box to 10
    maybe their is a better name than category's, eg; painting,fencing, deck build etc.
    I am glad you are helping me I'm pretty good on what needs doing. it's the coding part I hit road blocks on.
    Thanks for your help
    Waiting for a full featured smart phone with out marrying a provider
    Go Android
    Go raiders

  16. #96

    Thread Starter
    PowerPoster isnoend07's Avatar
    Join Date
    Feb 2007
    Posts
    3,237

    Re: [RESOLVED] How to Save classes to binary file vb6

    Name:  Bid Image.jpg
Views: 284
Size:  29.9 KB
    Quote Originally Posted by Max187Boucher View Post
    Yes it could be possible, we would need to modify the user-interface a bit and the udt(s). You'd have to give me more information on what and how you want it to look/have.
    Thanks Max187Boucher
    I can change the look, the functionally is what I am lost on.
    I have added a combox (cboBids) to hold the descriptions of the bids eg Roofing, painting, fencing, etc
    The user can type the name and all the details will belong to the name typed.
    Do you want me to upload your last version with combo added and sqs removed ?
    Waiting for a full featured smart phone with out marrying a provider
    Go Android
    Go raiders

  17. #97
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: [RESOLVED] How to Save classes to binary file vb6

    Yes you should post it, i will look at it when i can.

  18. #98

    Thread Starter
    PowerPoster isnoend07's Avatar
    Join Date
    Feb 2007
    Posts
    3,237

    Re: [RESOLVED] How to Save classes to binary file vb6

    Quote Originally Posted by Max187Boucher View Post
    Yes you should post it, i will look at it when i can.
    Thanks, got some errands will post it after
    Waiting for a full featured smart phone with out marrying a provider
    Go Android
    Go raiders

  19. #99

    Thread Starter
    PowerPoster isnoend07's Avatar
    Join Date
    Feb 2007
    Posts
    3,237

    Re: [RESOLVED] How to Save classes to binary file vb6

    Quote Originally Posted by isnoend07 View Post
    Thanks, got some errands will post it after
    Attached the project with txtSquares removed actually i just moved to the left of the screen and made it invisible
    I was thinking that the combobox will be populated with bid descriptions on form load eg;
    painting, new fence,landscaping, etc selecting from the combo will populate the main grid with bids
    Thank you
    Last edited by isnoend07; Sep 23rd, 2014 at 02:38 PM.
    Waiting for a full featured smart phone with out marrying a provider
    Go Android
    Go raiders

  20. #100

    Thread Starter
    PowerPoster isnoend07's Avatar
    Join Date
    Feb 2007
    Posts
    3,237

    Re: [RESOLVED] How to Save classes to binary file vb6

    Quote Originally Posted by isnoend07 View Post
    Attached the project with txtSquares removed actually i just moved to the left of the screen and made it invisible
    I was thinking that the combobox will be populated with bid descriptions on form load eg;
    painting, new fence,landscaping, etc selecting from the combo will populate the main grid with bids
    Thank you
    After giving more thought what if I included the cbo text as somehow part of the filename
    Here is a typical file name i have now
    C:\Documents and Settings\All Users.WINDOWS\Documents\RoofCalculator\Bids\Williams 1247 RiverBend rd RoofBids.dat
    its set like this
    MyFile = gstrBidsPath & "\" & ROOFBIDDER.txtLname & " " & ROOFBIDDER.txtAddress & " " & "RoofBids.dat"
    maybe make a directory with the homeowners name and address
    make another directory under the owners name-address called bids
    put each cbotext under that
    then on file open loop the bids directory and load into the combobox.
    When a user clicks a name in the combo it will open the saved file and populate the main grid.
    Of course if this is possible there would be more than 1 file.
    What do you think ?
    Waiting for a full featured smart phone with out marrying a provider
    Go Android
    Go raiders

Page 3 of 3 FirstFirst 123

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