Groups | Blog | Home
all groups > vb.net controls > september 2005 >

vb.net controls : User controls in VB.NET


sonali_reddy123 NO[at]SPAM yahoo.com
9/15/2005 7:34:27 AM
Hi,

I need a help regarding use of a user defined control in VB.NET.
I could able to prepare a user control and add it to my project
toolbox but the problem is how to pass the data from the application to
the events on the user control.

I found get and set methods do these two methods satisfy the entire
need or is their anything more I should know.

Sample example will be a better response.

Thanks in advance.
Dick Grier
9/15/2005 11:02:02 AM
Hi,

This is just like any class (object).

You use Set and Get to pass data into and out of the control or other class.
Normally this does not cause the generation of an event -- the exception
might be some sort of validation error event for data that you have set.

You use methods, that is calls to subroutines and functions in the control
or class that manipulate data. The result of such manipulation may cause
the object to raise an event. The methods may be Public or Private,
depending on what needs to be done -- this is the design process. There are
lots of examples available online (Google is your friend).

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.

AddThis Social Bookmark Button