Announcement

Collapse
No announcement yet.

VB programmers?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    VB programmers?

    alright im bored at work and im working on a stupid little application in VB... its a single form, but it needs an idle loop to keep the form contents moving and updated, but needs to yield to API events, so subs such as command1_onclick still run when appropriate...

    do: doevents: loop doesnt work, it keeps the PC responsive but never displays the form.

    just a do:loop kills it of course, since its an endless loop and never checks for events.

    its my understanding that a loop made to check for events with peekmessage is supposed to work, but i cant get on the net to research it and need just a bit of direction from a VB programmer...

    ive done stuff in VB, but its always me just figuring it out as i go, im familiar with it and know the syntax well (long time basic programmer) just using VB to deal with the API is pissing me off, since its not something i can just "make up" in my head.


    will provide code as necessary, but dont think it is... just need to make an idle loop that yields to API events.


    - 1993 Accord LX - White sedan (sold)
    - 1993 Accord EX - White sedan (wrecked)
    - 1991 Accord EX - White sedan (sold)
    - 1990 Accord EX - Grey sedan (sold)
    - 1993 Accord EX - White sedan (sold)
    - 1992 Accord EX - White coupe (sold)
    - 1993 Accord EX - Grey coupe (stolen)
    - 1993 Accord SE - Gold coupe (sold)
    Current cars:
    - 2005 Subaru Legacy GT Wagon - Daily driver
    - 2004 Chevrolet Express AWD - Camper conversion

    #2
    visual basic sucks.

    I hope i passed my class i just took

    Comment


      #3
      Mike, set up a do loop with a timer. When the timer is up (set whatever time you need) itll access hte do loop, which will check the API function you need. After that have the do loop reset the timer and restart the timer.

      Comment


        #4
        weird... this is VBA (visual basic for applications) for excel, so i think it might be stripped down... ive tried adding a bunch of controls besides the standard ones, all of which say they arent licensed and cant be used. the ONLY mention of the word timer in the help file is in reference to the function, which only returns the current tick count. tried to addhandler, but that doesnt seem to be supported either. what category is the timer control listed under, so i can add it to my toolbar?

        i may have fucked myself by starting this in VBA/excel... gonna have to do some more research at home, unless somebody else has any extra insight.


        - 1993 Accord LX - White sedan (sold)
        - 1993 Accord EX - White sedan (wrecked)
        - 1991 Accord EX - White sedan (sold)
        - 1990 Accord EX - Grey sedan (sold)
        - 1993 Accord EX - White sedan (sold)
        - 1992 Accord EX - White coupe (sold)
        - 1993 Accord EX - Grey coupe (stolen)
        - 1993 Accord SE - Gold coupe (sold)
        Current cars:
        - 2005 Subaru Legacy GT Wagon - Daily driver
        - 2004 Chevrolet Express AWD - Camper conversion

        Comment


          #5
          Originally posted by cp[mike]
          weird... this is VBA (visual basic for applications) for excel, so i think it might be stripped down... ive tried adding a bunch of controls besides the standard ones, all of which say they arent licensed and cant be used. the ONLY mention of the word timer in the help file is in reference to the function, which only returns the current tick count. tried to addhandler, but that doesnt seem to be supported either. what category is the timer control listed under, so i can add it to my toolbar?

          i may have fucked myself by starting this in VBA/excel... gonna have to do some more research at home, unless somebody else has any extra insight.
          Should be under microsoft basic tools or something. its been a while sorry. That version of VB is pretty ***.

          Comment


            #6
            I havnt touched VB since i was 10, but can you do something like

            while(true){

            do something
            form.refresh

            }

            I wish i knew VB better ...if it was Java, C, or C++ i could help you a lot more

            Owner of https://theclunkerjunker.com

            Comment


              #7
              Originally posted by Accord R33
              C++
              owns.

              Comment


                #8
                Originally posted by Accord R33
                I havnt touched VB since i was 10, but can you do something like

                while(true){

                do something
                form.refresh

                }

                I wish i knew VB better ...if it was Java, C, or C++ i could help you a lot more
                thats the code that im having issues with... and its form.repaint not form.refresh but thats besides the point. its not yielding to event messages, so other event handler subs never get called, and the form sits there frozen.

                VBA sucks ass. ill figure it out when i get home.


                - 1993 Accord LX - White sedan (sold)
                - 1993 Accord EX - White sedan (wrecked)
                - 1991 Accord EX - White sedan (sold)
                - 1990 Accord EX - Grey sedan (sold)
                - 1993 Accord EX - White sedan (sold)
                - 1992 Accord EX - White coupe (sold)
                - 1993 Accord EX - Grey coupe (stolen)
                - 1993 Accord SE - Gold coupe (sold)
                Current cars:
                - 2005 Subaru Legacy GT Wagon - Daily driver
                - 2004 Chevrolet Express AWD - Camper conversion

                Comment

                Working...
                X