PictureBox CausesValidation does not fire Validating event

G

Guest

H
I have a user control which contains a picture box (it is to act as a graphical command button). Everything seems Ok except for CausesValidation

When I place the user control ona form it says its CausesValidation property is True (and it still is in runtime) but if I click on the Control when the focus is a control which has code in it Validating event, the validation code does not run

I tried placing a simple picture box on the form and I notice it has no CausesValidation property - although it can be set at design mode. Does the CausesValidation now work for picture box controls and if not how can I get round this
many thanks in advanc
Siobhan
 
G

Guest

I have got a workaround to this, but if anyone has a real or better solution, or at least an answer as to why it won't work, I would very much appreciate it

My workaroubd is to place a text box behind the picure box, on the click event of the picture box i set focus to the text box, and the CausesValidation of the text box fires the valiating event of the control which has focus.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top