//获取当前位置
public void GetCurrentLocation( int pos)
{
nRet = AMONet._mnet_m4_get_position(CanS.RingNo, CanS.DevicIP, CanS.AxisNo, ref pos);
}
private void timer1_Tick(object sender, EventArgs e)
{
int posX = 0;
GetCurrentLocation( posX)
txtPosX.Text = Convert.ToString(posX);
}
在定时器函数中希望能将 GetCurrentLocation函数中返回的pos参数实时更新在textbox中,应该怎么实现