Announcement

Collapse
No announcement yet.

Wheel Mouse Control

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

  • Wheel Mouse Control

    Purchased the new optical Microsoft mouse. It has left/right buttons with a pressable wheel in the center.

    It also has two pressable buttons on the side to be pressed by your thumb.

    How can I take advantage of the wheel/side buttons in Dos Powerbasic? Or is it even possible?

    I would appreciate being able to detect:

    A> One click roll up (Make my display go up)
    B> One click roll down (Make the display go down)
    C> Roll Up
    D> Roll Down
    E> Big thumb button (End of data display)
    F> Small thumb button (Top of data display)

    If anyone can show me how to detect/trap this, I am make the program do what I want.

    Thank you.

    Robert

    ------------------

  • #2
    I tend to doubt Microsoft provides appropriate DOS driver support for the new mouse capabilities. Good luck.

    ------------------
    Tom Hanlin
    PowerBASIC Staff

    Comment


    • #3
      I would try INT33H, ax=3, & see what came back in bx. That is usually where the button state can be found. If it has any DOS drivers, load them first. I have a lot of mouse code somewhere if anyone is interested, all in QBX however

      ------------------


      [This message has been edited by David J Walker (edited September 25, 2001).]

      Comment


      • #4
        From David J Walker

        I would try INT33H, ax=3, & see what came back in bx.

        End Copy

        David- you are looking at a Assembly language illiterate. Do you mean if I type:

        bx= INT33H, ax

        and then run that, bx should have something in it?

        And yes, I would not mind seeing your mouse code if you don't mind sending it to me. If it bounces (my isp is cracking down on people who send files that are too large), let me know and I will provide an alternate email address.

        Thank you.

        Robert

        ------------------




        [This message has been edited by Robert Carneal (edited September 25, 2001).]

        Comment


        • #5
          Robert, please review chapter 15 in the Users Guide: "Assembly Language"... that should help you with the !INT &H33 usage.

          Note that you could use the REG and CALL INTERRUPT statements too, rather than inline-assembler..

          However, I would suggest that you could use the routines in MOUSUNIT.BAS code (supplied with PB/DOS) to get you started with the mouse driver.



          ------------------
          Lance
          PowerBASIC Support
          mailto:[email protected][email protected]</A>
          Lance
          mailto:[email protected]

          Comment


          • #6
            Maybe this should go into the source code forum but here's the
            PB2.1f version of what I use. It is abbreviated but should let
            you get the flavor of how to do it (should you desire to).

            sub mouse.on public ' Turn the mouse on
            reg 1,1 '
            call interrupt &h33 '
            end sub '
            '
            sub mouse.off public ' Turn the mouse off
            reg 1,2 '
            call interrupt &h33 '
            end sub '
            '
            function mouse.row% public ' Record current mouse row
            reg 1,3 '
            call interrupt &h33 '
            mouse.row% = reg(4) '
            end function '
            '
            function mouse.col% public ' Record current mouse column
            reg 1,3 '
            call interrupt &h33 '
            mouse.col% = reg(3) '
            end function '
            '
            function left.button% public ' Check for left button press
            left.button% = 0 '
            reg 1,3 '
            call interrupt &h33 '
            if reg(2) = 1 then '
            left.button% = 1 '
            end if '
            end function '
            '
            function right.button% public ' Check for right button press
            right.button% = 0 '
            reg 1,3 '
            call interrupt &h33 '
            if reg(2) = 2 then '
            right.button% = 1 '
            end if '
            end function '
            '


            ------------------
            There are no atheists in a fox hole or the morning of a math test.
            If my flag offends you, I'll help you pack.

            Comment


            • #7
              Mel, Thx! I am such a newbie and rookie at mouse routines.

              ------------------

              Comment


              • #8
                Hi Robert,

                I just wonder about your mouse-questions. A few days ago I
                already mailed you my complete GUI-libraries,
                INCLUDING mauslib.bas, a complete library for mouse access ...

                Rgds

                Gerhard

                ------------------

                Comment


                • #9
                  Gerhard-

                  You did? I believe you, but I didn't receive it. Is there a place I can download it from? If so, may I do that? I am on a cable modem and I might be able to download it faster than you can upload it to me.

                  If not, can you please resend it?

                  Thank you.

                  ------------------


                  [This message has been edited by Robert Carneal (edited September 26, 2001).]

                  Comment


                  • #10
                    Originally posted by Robert Carneal:
                    Purchased the new optical Microsoft mouse. It has left/right buttons with a pressable wheel in the center.

                    It also has two pressable buttons on the side to be pressed by your thumb.

                    How can I take advantage of the wheel/side buttons in Dos Powerbasic? Or is it even possible?

                    I would appreciate being able to detect:

                    A> One click roll up (Make my display go up)
                    B> One click roll down (Make the display go down)
                    C> Roll Up
                    D> Roll Down
                    E> Big thumb button (End of data display)
                    F> Small thumb button (Top of data display)

                    If anyone can show me how to detect/trap this, I am make the program do what I want.

                    Thank you.

                    Robert

                    I maybe late posting this but I have a PBU file that I made that gives mouse support I would be
                    happy to send it to you. It has some cool features. I would like to see what other people think of it.

                    ------------------


                    [This message has been edited by Joel Adams (edited September 29, 2001).]

                    Comment


                    • #11
                      Joel-

                      I -think- I have the problem solved, but I would still like to see the PBU file. I probably could learn something from it.

                      Can you send it, or do I download it from some site?

                      Thank you.

                      Robert



                      ------------------

                      Comment


                      • #12
                        Joel, I'm really interested in your mouse unit, and would love to take a look at it.
                        Could you please send it to me too?

                        Kind regards

                        ------------------
                        Sebastian Groeneveld
                        mailto:[email protected]dra[email protected]</A>
                        Sebastian Groeneveld
                        mailto:[email protected][email protected]</A>

                        Comment


                        • #13
                          Joel,

                          I'd like it, too! Are you also willing to distribute the
                          source file for the UNIT?

                          If you're willing, you can e-mail it to my address in my
                          signature block.

                          Regards,


                          ------------------
                          Clay C. Clear

                          Clay Clear's Software
                          mailto:[email protected][email protected]</A>

                          Comment


                          • #14
                            Assorted mouse libraries, with source code, may be found here:
                            http://www.powerbasic.com/files/pub/pbdos/library/

                            ------------------
                            Tom Hanlin
                            PowerBASIC Staff

                            Comment

                            Working...
                            X