Results 1 to 5 of 5

Thread: Sorry for asking but.......

  1. #1
    lez
    lez is offline
    FLAC lez's Avatar
    Join Date
    Jan 2004
    Location
    UK
    Posts
    1,334

    Sorry for asking but.......

    Sorry for asking but.......

    <edit> found what I need.

    <edit> Now have another issue.......

    Global integers in VB5, HOW?! <edit>thanks! kamikaze2112!





    Next problem

    In days of old when code was bold I would..........

    Open "settings.ini" for input as #1

    <edit> Done found some nice litle routine for ini file reading/writing

    <edit> Well here I am still at the machine 10 hrs later! Can now read/write mouse position and red jostick and use joystick to move mouse etc


    And problem 65536: How to find the current volume level!<edit> And I have found it! a further 4 hours on google and lots of 'classes' and 'modules' some small some bloody huge I have a medium sized one with a setvol/getvol! 14hrs! thought it would take at least a day to find....









    Sorry for being clueless but the damn language hates me, the help files are useless and the 'guides' are padded with dumbing down to the point of being useless, bring back old basic!

  2. #2
    Variable Bitrate kamikaze2112's Avatar
    Join Date
    Feb 2005
    Location
    Barrie Ontario
    Posts
    406
    i believe that if you dim your variable using global instead, it's available to your whole project. ex:

    Code:
    global myVariable as Integer
    etc.

    Hope this helps


  3. #3
    lez
    lez is offline
    FLAC lez's Avatar
    Join Date
    Jan 2004
    Location
    UK
    Posts
    1,334
    Quote Originally Posted by kamikaze2112
    i believe that if you dim your variable using global instead, it's available to your whole project. ex:

    Code:
    global myVariable as Integer
    etc.

    Hope this helps
    Thanks, I really mean thanks, I bet 100ppl who visit this group new that etc.

    I did find it, its a little hard to learn the sytax of a language your not used to when you dont have the manuals/books etc.

    google is useless for most of this, I spent hours yesterday trying to find out how to control the volume, and I still can only set it I cant find how to read the current value so I can restore it on program exit.

    Although I think wmm.dll plays a part.


    Lots of examples on the VB sites dont load in, the complain of unsupported keyewords etc, most common one is 'retained=0'

    I dont know what it is, but if you text edit the file, remove that re-save and reload its fine, so maybe its a reference for other versions not supported in v5 that i'm using.

    SO my adventure continues, and today I will spend many more hours on goole and vb sites trying to find the elusive read volume command. (audio not drive name)
    Lez, more widely known as flez1966

  4. #4
    Variable Bitrate kamikaze2112's Avatar
    Join Date
    Feb 2005
    Location
    Barrie Ontario
    Posts
    406
    depending on the version of media player you are using, i believe the volume stuff is
    Code:
     windowsmedia1.settings.volume = {integer between 0 and 100}
    You really could use to download the SDK for whatever version of media player you are coding for. Alot of people say that WMP9 is the way to go, but I like 10 myself. It will help you out with all the methods, constants, events, properties, etc


  5. #5
    lez
    lez is offline
    FLAC lez's Avatar
    Join Date
    Jan 2004
    Location
    UK
    Posts
    1,334
    No I want to 'variable=master.volume' not 'master.volume=variable'

    I had found lots of ''classes' and 'modules' that had a setvol type command but dont come with a getvol.

    But by about 10pm I had found one and I stopped at midnight for a break, from 8am, but I have it, working!

    Thanks for your reply.
    Lez, more widely known as flez1966

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •