Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Oct 1, 1996

Illegal SetFocus Call

Question:
Sometimes when I call
Text1.SetFocus
it returns me an "Illegal function call" error. Any idea why?

Answer:
Normally, if the Form is not visible, you can't call SetFocus to it. I would imagine you get this error when you call this code from Form_Load. The control is not available at that point in the application load process.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date