p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_vb thread: get/let


Message #1 by "Fredrick J. Krantz" <krunch97@m...> on Wed, 7 Jun 2000 16:49:19
I do not undestand how to use the get and put routines.  Can someone 

explain what they are for and how to use them.  If possible provide a 

sample project for me to follow, I am good at seeing samples.



thanks,



krunch97@m...

Message #2 by "John Choy" <choy_john@h...> on Sat, 10 Jun 2000 13:42:16
Get and Let are COM property. Let's say you have a variable that you want 

the user to access it. But you want the user to access it in your define 

ways then you use Get and Let.



Say you have a variable in COM call m_color. It can only be set to black or 

white. Then you let your user access m_color through Let property.



Public Sub Let_ChangeColor (InColor as integer)

      Select Cast InColor

       Case InBlack m_color = InBlack

       Case InWhite m_color = InWhite

      End Select

End Sub 


  Return to Index