У меня графический режим 640*480*256 на FreePasclal'e и не хочет работать мышка, не инициализируется. Скажите пожалуйста, в чем может быть дело?
Модуль Mouse не предназначен для графических режимов.
It is intended to be used only in text-based screens, for instance in conjunction with the keyboard and video unit. No support for graphical screens is implemented, and there are (currently) no plans to implement this.
Подключай модуль WinMouse.
{$apptype GUI} uses WinCrt, Windows, WinMouse, Graph; procedure InitGr; var GraphDriver, GraphMode: SMALLINT; begin ShowWindow (GetActiveWindow,0); GraphDriver := d8bit; GraphMode := m800x600; InitGraph(GraphDriver,GraphMode,'..\bgi'); end; Var X , Y , State : Longint; flag: boolean; begin InitGr; Line (0, 0, GetMaxX, GetMaxY); If MouseFound Then begin InitMouse; ShowMouse; Randomize; flag := false; repeat GetMouseState ( x , y , State ); If ( State and LButton ) = LButton Then circle (x, y, 20); If ( State and RButton ) = RButton Then flag := true; until flag; HideMouse; end; repeat until keypressed; CloseGraph; end.