向上箭头功能 [英] Up arrow funcionality

查看:90
本文介绍了向上箭头功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我有几个文本框.当我点击向上箭头"时,它应该像shift + tab一样工作,即控件应该切换到以前的tab索引.
当文本框为空时,我可以执行此操作.但是,当文本框包含某些内容时,则调试时控件根本不会遵循以下代码.

Hi, I have few textboxes. When I hit "Up arrow", it should work as shift+tab i.e control should swith to previous tab index.
I''m able to do it when textbox is empty. But when textbox contains something, then control is not going to following code at all while debugging.

if (e.KeyValue == 38)
     SendKeys.Send("+{TAB}");



只是光标在文本中从右移到了左.



simply the cursor is moving from right to left through the text.

推荐答案

Key Up事件可能会帮助您

试试下面的代码

Key Up Event may helps you

try the below code

private void textBox1_KeyUp(object sender, KeyEventArgs e)
    {
        textBox2.Focus();
    }


这篇关于向上箭头功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆