How to change the focus to another control  
Author Message
Steev





PostPosted: Visual Basic Express Edition, How to change the focus to another control Top

As a beginner, I'm learning the simple bits - currently learning the math side of things.

I have 3 textboxes and I enter numbers in them. When I move to the button and press, the answer is shown in a message box.

How can I get the focus to move automatically from the button to the next control I realise I have to close the message box first, but after it closes, I'd like the focus to be moved automatically.

Thanks for your help!!

Regards,

Steve




Visual Studio Express Editions42  
 
 
AliQ





PostPosted: Visual Basic Express Edition, How to change the focus to another control Top

When they click on the button...

Msgbox("Anything")
Me.Textbox1.Select

If that isn't what you wanted - Please say



 
 
Steev





PostPosted: Visual Basic Express Edition, How to change the focus to another control Top

Thanks very much, AliQ!!

I've just tried it and that code is exactly what I'm looking for. Much appreciated!

It's simple if you know these words - I tried lots of fancy things like "shift it here", "move it there", "put it over there" etc. It's a matter of practise and perserverance.

again, thanks!!

Steve



 
 
AliQ





PostPosted: Visual Basic Express Edition, How to change the focus to another control Top

No Problem really
Good luck on your project

AliQ