Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GFX GETMOUSE
#1
I have started experimenting with the clever GFX GETMOUSE routine, hoping to show how I use the mouse to activate my own ideas of buttons, as I have long since done with Quickbasic. But the cursor vanishes in the code below, when a full screen is activated. Anyone know why?

Gordon

Code:
' Set video mode and enter loop
DIM x AS INTEGER, y AS INTEGER, buttons AS INTEGER
SCREEN 13
DO
    ' Get mouse x, y and buttons. Discard wheel position.
    GETMOUSE x, y, , buttons
    LOCATE 1, 1
    IF x < 0 THEN
        PRINT "Mouse not available or not on window"
    ELSE
        PRINT USING "Mouse position: ###:###  Buttons: "; x; y;
        IF buttons AND 1 THEN PRINT "L";
        IF buttons AND 2 THEN PRINT "R";
        IF buttons AND 4 THEN PRINT "M";
        PRINT "   "
    END IF
LOOP WHILE INKEY$ = ""
END
Reply
#2
Cursor doesn't vanish here when I go to fullscreen with the program you posted.

FreeBASIC 0.12b
Windows XP
DirectX 9.0c
nVidia GeForce FX 5700
Reply
#3
try turning on the mouse with SETMOUSE.
Jumping Jahoolipers!
Reply
#4
Thanks guys, but no luck, and there is no SETMOUSE function listed in either GFXLIB.TXT or KEYWORDS.TXT. The cursor returns if I use Alt+Return to change to small screen, but I prefer full screen for applications.

I too use Win XP Home, but perhaps the problem is because I still use Direct X 8.1 and I have not bothered install to version 9,assuming it was only needed fro the latest expensive super games!

I have no problems with mouse routines for QuickBasic

Gordon
Reply
#5
There is a SETMOUSE funk. Try to DL the latest ver of FB. it's 0.12
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#6
Thanks, but I now have the problem the code below in the GFX list below will not now compile with FB v.012.B-Win32 only with v.012.B-Win32 so I cannot try SETMOUSE yet.

Of course I could stick to the smaller screen. In which case how do I ensure a program always start/defaults in a smaller screen, without having to create and use a shortcut with the properties set to Window.

Am I the only guy testing FB? Anyway I have got plenty of time on my hands !!

Gordon

Code:
' Set video mode and enter loop
DIM x AS INTEGER, y AS INTEGER, buttons AS INTEGER
SCREEN 13
DO
    ' Get mouse x, y and buttons. Discard wheel position.
    GETMOUSE x, y, , buttons
    LOCATE 1, 1
    IF x < 0 THEN
        PRINT "Mouse not available or not on window"
    ELSE
        PRINT USING "Mouse position: ###:###  Buttons: "; x; y;
        IF buttons AND 1 THEN PRINT "L";
        IF buttons AND 2 THEN PRINT "R";
        IF buttons AND 4 THEN PRINT "M";
        PRINT "   "
    END IF
LOOP WHILE INKEY$ = ""
END
Reply
#7
Sorry Guys ---

I am being a twit as usual. The code does compile with the latest version OK including the SETMOUSE.

I tried moving a copy of FBC.EXE into another folder, and it did not work

Will the report next stage.

Gordon
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)