var myjoy: tjoyinfo;begin joygetpos(joystickid1,@myjoy);trackbar1.position := myjoy.wypos;trackbar2.position := myjoy.wxpos;radiobutton1.checked := (myjoy.wbuttons and joy_button1)>0;radiobutton2.checked := (myjoy.wbuttons and joy_button2)>0;end; |
Не забудьте включить MMSYSTEM в список используемых (USES) модулей. [000184]