Click here to Skip to main content
15,922,894 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,
I have one button in a dialog box. I want to get Focus to that button on loading. How can I move with this? Please help me....

[edit]DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously. - OriginalGriff[/edit]
Posted
Updated 29-May-11 20:53pm
v2

In the main sub
Button1.foucs()
 
Share this answer
 
Comments
Jijesh Balakrishnan 30-May-11 4:01am    
thank you
Jijesh Balakrishnan 30-May-11 4:11am    
there is no such function focus()
 
Share this answer
 
Comments
Jijesh Balakrishnan 30-May-11 4:01am    
thank you
Use SetFocus and return FALSE at the end of your WM_INITDIALOG handler... this should do it.

Hope this helps...
 
Share this answer
 
Comments
Jijesh Balakrishnan 30-May-11 3:02am    
i've tried with setfocus function. but its not working. can u please tell me how should i use the setfocus function?
Jijesh Balakrishnan 30-May-11 3:07am    
thank you..i got the answer..
True.It will work. My 5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900