在mshflexgrid的keypress事件中加 If KeyAscii = 13 Then mshflexgrid1.col=mshflexgrid1.col+1'移到下一列 End if
If KeyAscii = 13 Then if mshflexgrid1.col = mshflexgrid1.cols-1 then mshflexgrid1.col=0 mshflexgrid1.row=mshflexgrid1.row+1 else mshflexgrid1.col=mshflexgrid1.col+ End if
不好意思,忘了加end if,呵呵,应该是: If KeyAscii = 13 Then if mshflexgrid1.col = mshflexgrid1.cols-1 then mshflexgrid1.col=0 mshflexgrid1.row=mshflexgrid1.row+1 else mshflexgrid1.col=mshflexgrid1.col+1 end if End if
If KeyAscii = 13 Then
mshflexgrid1.col=mshflexgrid1.col+1'移到下一列
End if
if mshflexgrid1.col = mshflexgrid1.cols-1 then
mshflexgrid1.col=0
mshflexgrid1.row=mshflexgrid1.row+1
else
mshflexgrid1.col=mshflexgrid1.col+
End if
If KeyAscii = 13 Then
if mshflexgrid1.col = mshflexgrid1.cols-1 then
mshflexgrid1.col=0
mshflexgrid1.row=mshflexgrid1.row+1
else
mshflexgrid1.col=mshflexgrid1.col+1
end if
End if