顺便还把单元格给变了:
procedure TFGLGL.StringGrid1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var MousePos: TSmallPoint; begin if Button = mbRight then begin MousePos.x := x; MousePos.y := y; SendMessage(StringGrid1.Handle, WM_LBUTTONDOWN, 0, MAKELONG(x, y)); SendMessage(StringGrid1.Handle, WM_LBUTTONUP, 0, MAKELONG(x, y)); end; end;