VB新手,需要send.focus()方面的帮助 [英] New to VB, need help with sender.focus()

查看:67
本文介绍了VB新手,需要send.focus()方面的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在学校,参加VB .NET 2003课程,

老师教我们如何使用Sender.Focus()返回

焦点收到焦点的控件。


然而,当我回到家,并在我自己的副本上试用它时,它是b $ b VB .NET 2003似乎没有用,事实上,Intellisense提供的唯一

方法是GetType。我无法在MSDN

图书馆或其他任何地方找到任何信息。
无法找到任何信息。我希望

有人在这里可以帮助我!我很绝望!

解决方案

*" Euphor2" <一个******* @ discussions.microsoft.com> scripsit:

我在学校,参加VB .NET 2003课程,
老师教我们如何使用Sender.Focus()返回
焦点收到焦点的控制。

然而,当我回到家,并在我自己的VB .NET 2003副本上试用它时,它似乎无法工作,事实上,Intellisense提出的唯一方法是GetType。我无法在MSDN
库中或其他任何地方找到任何信息。我希望有人在这里帮助我!我很绝望!




使用它:


\\\

DirectCast(发件人,控制).Focus()

///


-

Herfried K. Wagner

MVP·VB Classic,VB.NET

< http://www.mvps.org/dotnet>


-----原始消息-----
*" Euphor2" <一个******* @ discussions.microsoft.com>



scripsit:

我在学校,参加VB .NET 2003课程,并且
老师教我们如何使用Sender.Focus()将焦点返回到收到焦点的控件。

然而,当我回到家中,并在我自己的VB .NET 2003上复制
时,它似乎无法工作,实际上只有
方法提出Intellisense的是GetType。我无法在MSDN
库中或其他任何地方找到任何信息。我是
希望有人在这里帮助我!我很绝望!



使用它:

\\\
DirectCast(发件人,控制).Focus()
///

- Herfried K. Wagner
MVP·VB Classic,VB.NET
< http://www.mvps。 org / dotnet>




我刚刚尝试过你的建议,不幸的是它没有b $ b似乎也工作了。程序编译好了,行之前和之后都执行了,但这个特殊的

语句什么都不做。


感谢您的帮助。


*< an ******* @ discussion.microsoft.com> scripsit:

\\\
DirectCast(发件人,控制).Focus()
///


[...]我刚刚尝试过你的建议,不幸的是它似乎也没有用。程序编译好了,行之前和之后都执行了,但是这个特殊的
语句什么都不做。




1.哪里做你使用这个声明吗?


2.你想把焦点放在哪种控制上?


-

Herfried K. Wagner

MVP·VB Classic,VB.NET

< http://www.mvps.org/dotnet>


I''m in school, taking a VB .NET 2003 course, and the
teacher taught us how to use Sender.Focus() to return
focus to the control from which focus was received.

However, when I got home, and tried it on my own copy of
VB .NET 2003, it doesn''t seem to work, in fact the only
method that comes up with Intellisense is GetType. I
can''t find any information anywhere either in the MSDN
Library, or anywhere else for that matter. I was hoping
someone here could help me! I''m desperate!

解决方案

* "Euphor2" <an*******@discussions.microsoft.com> scripsit:

I''m in school, taking a VB .NET 2003 course, and the
teacher taught us how to use Sender.Focus() to return
focus to the control from which focus was received.

However, when I got home, and tried it on my own copy of
VB .NET 2003, it doesn''t seem to work, in fact the only
method that comes up with Intellisense is GetType. I
can''t find any information anywhere either in the MSDN
Library, or anywhere else for that matter. I was hoping
someone here could help me! I''m desperate!



Use this:

\\\
DirectCast(sender, Control).Focus()
///

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>


-----Original Message-----
* "Euphor2" <an*******@discussions.microsoft.com>


scripsit:

I''m in school, taking a VB .NET 2003 course, and the
teacher taught us how to use Sender.Focus() to return
focus to the control from which focus was received.

However, when I got home, and tried it on my own copy of VB .NET 2003, it doesn''t seem to work, in fact the only method that comes up with Intellisense is GetType. I
can''t find any information anywhere either in the MSDN
Library, or anywhere else for that matter. I was hoping someone here could help me! I''m desperate!



Use this:

\\\
DirectCast(sender, Control).Focus()
///

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
.



I just tried your advice, and unfortunately it doesn''t
seem to work either. The program compiles fine, the line
before it and after it both execute, but this particular
statement does nothing.

Thank you for trying to help.


* <an*******@discussions.microsoft.com> scripsit:

\\\
DirectCast(sender, Control).Focus()
///

[...] I just tried your advice, and unfortunately it doesn''t
seem to work either. The program compiles fine, the line
before it and after it both execute, but this particular
statement does nothing.



1. Where do you use this statement?

2. Which type of control do you want to set the focus to?

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>


这篇关于VB新手,需要send.focus()方面的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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