Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: SET FOCUS ERROR #5


Message #1 by "Monty" <montylove@h...> on Sun, 15 Dec 2002 22:58:29 +0530
You can set focus only after the form has been diaplayed. since you are
adding the code on form load and the form is not visible it cant
setfocus.Put the set focus in the form activate event, itll work

Satya

----- Original Message -----
From: "Monty" <montylove@h...>
To: "professional vb" <pro_vb@p...>
Sent: Sunday, December 15, 2002 11:38 PM
Subject: [pro_vb] SET FOCUS ERROR #5

> on form_load
>
> i try to run this code directly
>
> text1.setfocus
>
> then i get error #5 ' Invalid call (Something like that)
> but when i place the same code under command1_click
> then everything goes fine
>
> Can u tell me whats wrong ?
>
> Monty
>
>
>
>

*********************************************************
Disclaimer

This message (including any attachments) contains 
confidential information intended for a specific 
individual and purpose, and is protected by law. 
If you are not the intended recipient, you should 
delete this message and are hereby notified that 
any disclosure, copying, or distribution of this
message, or the taking of any action based on it, 
is strictly prohibited.

*********************************************************
Visit us at http://www.mahindrabt.com




  Return to Index