Click here to Skip to main content
15,887,485 members
Home / Discussions / C#
   

C#

 
QuestionEvent Question Pin
E_Gold5-Mar-09 9:31
E_Gold5-Mar-09 9:31 
AnswerRe: Event Question Pin
Christian Graus5-Mar-09 9:45
protectorChristian Graus5-Mar-09 9:45 
AnswerRe: Event Question Pin
Eslam Afifi5-Mar-09 9:48
Eslam Afifi5-Mar-09 9:48 
GeneralRe: Event Question Pin
Yusuf5-Mar-09 10:11
Yusuf5-Mar-09 10:11 
GeneralRe: Event Question Pin
Eslam Afifi5-Mar-09 12:55
Eslam Afifi5-Mar-09 12:55 
GeneralRe: Event Question Pin
E_Gold5-Mar-09 10:12
E_Gold5-Mar-09 10:12 
GeneralRe: Event Question Pin
Yusuf5-Mar-09 10:22
Yusuf5-Mar-09 10:22 
AnswerRe: Event Question Pin
DaveyM695-Mar-09 10:21
professionalDaveyM695-Mar-09 10:21 
You can call the method that normally handles the event directly as has been suggested.

To actually raise the event you need to get access to the TextBox's OnEnter method. This isn't as easy as the question you posed earlier so I think the others are being a bit harsh flaming you.

There are two ways that I know of. The first involves reflection:
typeof(TextBox).GetMethod(
    "OnEnter", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic
    ).Invoke(
    textBox1, new object[] { EventArgs.Empty }
    );
The other is to subclass the TextBox and add a public PerformEnter method. From it call OnEnter(EventArgs.Empty), and use your derived TextBox instead of the original.

Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

GeneralRe: Event Question Pin
E_Gold5-Mar-09 10:31
E_Gold5-Mar-09 10:31 
GeneralRe: Event Question Pin
Christian Graus5-Mar-09 12:43
protectorChristian Graus5-Mar-09 12:43 
GeneralRe: Event Question Pin
_Maxxx_5-Mar-09 14:09
professional_Maxxx_5-Mar-09 14:09 
GeneralRe: Event Question Pin
DaveyM696-Mar-09 1:03
professionalDaveyM696-Mar-09 1:03 
GeneralRe: Event Question Pin
E_Gold7-Mar-09 19:16
E_Gold7-Mar-09 19:16 
Question2 way Remoting from client to installed service and Access Denied issue Pin
carbon_golem5-Mar-09 7:16
carbon_golem5-Mar-09 7:16 
AnswerRe: 2 way Remoting from client to installed service and Access Denied issue Pin
led mike5-Mar-09 9:01
led mike5-Mar-09 9:01 
GeneralRe: 2 way Remoting from client to installed service and Access Denied issue Pin
carbon_golem5-Mar-09 9:11
carbon_golem5-Mar-09 9:11 
AnswerRe: 2 way Remoting from client to installed service and Access Denied issue - SOLVED Pin
carbon_golem5-Mar-09 9:03
carbon_golem5-Mar-09 9:03 
QuestionIs the a max row count for SQLDataReader? Pin
Ben Cocker5-Mar-09 6:22
Ben Cocker5-Mar-09 6:22 
AnswerRe: Is the a max row count for SQLDataReader? Pin
Luc Pattyn5-Mar-09 6:34
sitebuilderLuc Pattyn5-Mar-09 6:34 
GeneralRe: Is the a max row count for SQLDataReader? Pin
Ben Cocker5-Mar-09 6:48
Ben Cocker5-Mar-09 6:48 
AnswerRe: Is the a max row count for SQLDataReader? Pin
Luc Pattyn5-Mar-09 7:14
sitebuilderLuc Pattyn5-Mar-09 7:14 
AnswerRe: Is the a max row count for SQLDataReader? Pin
Luc Pattyn5-Mar-09 8:04
sitebuilderLuc Pattyn5-Mar-09 8:04 
GeneralRe: Is the a max row count for SQLDataReader? Pin
Jon Rista5-Mar-09 10:27
Jon Rista5-Mar-09 10:27 
AnswerRe: Is the a max row count for SQLDataReader? Pin
Luc Pattyn5-Mar-09 10:45
sitebuilderLuc Pattyn5-Mar-09 10:45 
GeneralRe: Is the a max row count for SQLDataReader? Pin
Jon Rista5-Mar-09 12:18
Jon Rista5-Mar-09 12:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.