Results 1 to 6 of 6

Thread: Just some genral vb questions

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    Launceston, Tasmania, Australia
    Posts
    44

    Post

    Howdy All

    Just wondering if some of ya's could answer a few questions for me? if ya can I'd apreciate it thanx!

    oook first off the progress bar, how do you get it to tell the truth, what I mean about this is progress at the right time for the job the form is doing, so if 90% is done the bar would be at 90%, cause at the moment I am just using a timer and code like this i think progressbar1.value = progressbar1.value + 2

    and just increase the value and interval of the timer to make it go longer.

    ok now the next question is their anyway to compile a project in vb 5 that doesn't need the Msvbvm50.dll because its pretty stupid if you make a 200 kb project and then you need a 1.28 mb dll file just so that it will work.

    also with some projects the first time they are run they have like a settings for you to set in the project and you set them and they save and each time there after you don't have to fill them out again, how is this done? is with the registry? and can someone explain to me how to do this as the registry as always confused me and give me a example code on how to do this?

    thanx ya's all



    ------------------
    Mooose

  2. #2

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    Launceston, Tasmania, Australia
    Posts
    44

    Post

    Oh yeah I forgot one thing I meant to include in the last lot of questions so here goes: I got an update to my microsoft winsock file and now it won't let me use it when I am trying to make a project with the winsock control, it give me some message saying i don't have the right license to use this feature or some ****, is there a site where you can download these files that do have the license so you can use them in visual basic?

    thanx

    ------------------
    Mooose

  3. #3
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923

    Post

    G'day Mooose, how are the tinnies flowing...?

    The progress bar is a lying sod sometimes, you have to give it a right kick up the back-side, or give it the right values.

    First off, set the Min and Max values...

    ProgressBar1.Min = 0
    ProgressBar1.Max = 4

    The max value is important, you have to know how many times you are going to increment the value, or it will show bogus results. For example, if I had a loop that I knew would loop 4 times, I would set the Max value to 4...easy right!

    Then you need to set the value of the progress bar to the Min value already defined, like so:

    ProgressBar1.Value = ProgreeBar1.Min

    To increment the progress bar, like I would in my loop, you need to use:

    ProgressBar1.Value = ProgressBar.Value + 1

    And that's about it for progress bars.

    I don't think you can have a project without MSVBVM??.DLL, otherwise it would stink and not run.

    Good ol' registry. I use the registry to store tonnes of stuff. You need a function that will Read/Write to the registry. Check out http://www.vb-world.net/articles/registry2/ for details on how the registry works, and some code you can steal to read/write.

    What you could do is put a value in the registry that is blank, and when your program opens it checks that value. If it is blank, the program has not been run before, and you can show a "Settings" screen. If it is not blank, then don't show a "Settings" screen. When the use has filled out the settings form, you can set the value in the registry to say "1", and everytime your program runs, increment that value. That way, you have a neat counter than shows how many times your app has been opened.

    With regards to the Licence ****, i suggest you uninstall the update, as clearly it is crap.

    Have fun!

    Regards,


    ------------------
    - Chris
    chris.kilhams@btinternet.com
    If it ain't broke - don't fix it

  4. #4
    Hyperactive Member Juan Carlos Rey's Avatar
    Join Date
    Aug 1999
    Location
    Mendoza, Argentina
    Posts
    301

    Post

    Yes, VBRun (dll's) sux
    But consider this: your app can be as small as 200 K thanks to that dll. Imagine the number of controls, routines, etc. there are inside that dll.
    And, you can have any number of apps all running with a single dll in the system!

  5. #5

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    Launceston, Tasmania, Australia
    Posts
    44

    Post

    thanx for your help chrisjk it helped me out alot, but about the winsock controls, there is no option to uninsall the update, I downloaded it directly from microsofts homepage, I've tried reinstalling vb 5 enterpirise edition but it won't write over the old winsock controls, so I can't use the winsock controls anymore, is there anyway to get them back to there former selves? cause it was a handy control for alot of things, or does anyone know any other way to make it work?

    ------------------
    Mooose

  6. #6
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Cleveland, Ohio
    Posts
    263

    Post

    Note on progress bars:

    The reason they "lie" is because they're typically used in processes that require a lot of looping. The good side of using a progress bar to show the status is that it doesn't need updating every single loop. It only updates itself at those certain increments to try and maximize the loop speed, know what I mean? If you want to make a more precise progress bar, just use two shapes (rectangles), have one represent the whole length (100%), and the other slowly grow to that bar's length (representing the length completed). OR, you could just have a label display the percent completed.

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