如题!

解决方案 »

  1.   

    可以计算光标所在位置,StatusBar共4样,前三栏长度为100
    var
      pt:Tpoint;
      FrmLeft:integer;
    begin
       getcursorpos(pt);
       //showmessage('x:'+inttostr(pt.X)+'y:'+inttostr(pt.Y));
       FrmLeft:=form1.Left;
       if pt.X<FrmLeft+100 then
          showMessage('在第一栏')
       else  if pt.X<FrmLeft+200 then
          showMessage('在第二栏')
       else  if pt.X<FrmLeft+300 then
          showMessage('在第三栏')
       else
           showMessage('在第四栏');
    end;