Posts: 285
Threads: 70
Joined: Feb 2005
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
Posts: 1,272
Threads: 36
Joined: Feb 2003
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
Posts: 1,688
Threads: 119
Joined: Jun 2003
try turning on the mouse with SETMOUSE.
Jumping Jahoolipers!
Posts: 285
Threads: 70
Joined: Feb 2005
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
Posts: 3,288
Threads: 167
Joined: Nov 2001
There is a SETMOUSE funk. Try to DL the latest ver of FB. it's 0.12
Posts: 285
Threads: 70
Joined: Feb 2005
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
Posts: 285
Threads: 70
Joined: Feb 2005
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