By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,836 Members | 1,840 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,836 IT Pros & Developers. It's quick & easy.

HELP!

P: n/a
Hi I created windows user contorl and added reference to other project.
Control contains TextBox and PictureBox. How to handle some event of textbox
(validating for example) of user control in form?
Thank's
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,

Add the event to the control. Raise the controls event in the
textbox event.

Public Shadows Event Validating(ByVal sender As Object, ByRef e As
System.ComponentModel.CancelEventArgs)

Private Sub TextBox1_Validating(ByVal sender As Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles TextBox1.Validating

RaiseEvent Validating(Me, e)

End Sub

Ken

--------------------------------

"dzemo" <dz***@wizard.ba> wrote in message
news:O3**************@TK2MSFTNGP12.phx.gbl...
Hi I created windows user contorl and added reference to other project.
Control contains TextBox and PictureBox. How to handle some event of textbox
(validating for example) of user control in form?
Thank's

Nov 20 '05 #2

P: n/a
The whole idea of a User COntrol is to do things like that in the control
itself, not in the form.

But if you really want to do this you will have to declare the textbox as
public in your control, instead of private (default).

Telmo Sampaio

"dzemo" <dz***@wizard.ba> wrote in message
news:O3**************@TK2MSFTNGP12.phx.gbl...
Hi I created windows user contorl and added reference to other project.
Control contains TextBox and PictureBox. How to handle some event of
textbox
(validating for example) of user control in form?
Thank's

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.