dim key as string
key=e.keychar
if key=microsoft.visualbasic.chrw(13) then
button1.focus
key=e.keychar
if key=microsoft.visualbasic.chrw(13) then
button1.focus
end if
窗体中有很多控件,控件回车键方法
dim key as string
key=e.keychar
if key=microsoft.visualbasic.chrw(13) then
dim obj as object
for each obj in me.controls
if typeof obj is textbox and obj.tabindex=sender.tabindex+1then
obj.focus
end if
next
end if