如何实现vb中按回车控件焦点向下一个按tab顺序下移
解决方案 »
- 有朋友用过Indy UDP的广播技术吗?
- 关于CANVAS作为参数传递的问题
- ActiveForm放在 VC或Delphi的窗口里,点按钮出现死锁,是什么原因?
- 紧急求救.关于POST事件的执行
- API发送和接收IP包的困惑
- 程序打包发布的问题。
- 请问DELPHI的那个‘秘笈’窗口怎么出来啊
- table.edit 一处理出现multiple records found, but only one was expected的错误,怎么回事?
- 关于TPersistentClass使用时遇到的难理解的问题?
- 一个关于控件消息的问题,望指教!!!!
- 求一对多表数据的处理方案,急!
- 小弟刚刚接触 请指点一二
procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
begin
if (key = #13) then
begin
SelectNext(ActiveControl, true, true);
end;
end;
if key=#13 then
if not (activecontrol is tdbgrid) then
begin
key:=#0;
perform(WM_NEXTDLGCTL,0,0);
end
else if (activecontrol is tdbgrid) then
begin
with tdbgrid(activecontrol) do
if selectedindex < (fieldcount-1) then
selectedindex:=selectedindex+1
else selectedindex:=0;
end;
***************************************************
procedure TForm1.目前的控键KeyPress(...........);
begin
if (key = #13) then
目标控键名称.SetFocus;
end;
***************************************************
有问题可以和我在联系!!!!
设置form的KeyPreview属性为true
form的KeyDown事件中写下:Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
SendKeys "{tab}+{home}"
End If
End Sub