Wrox Programmer Forums
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 27th, 2005, 05:24 PM
Authorized User
 
Join Date: Mar 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default ByRef property

Im wondering if there is a way to create a property that accepts byref controls.

Code:
Private m_labelItem As Label

Public Property LabelItem As Label
    Get
        return m_labelItem
    End Get
    Set(ByRef value As Label)
        m_labelItem = value
    End Set
End Property
The code above obviously doesnt work as Set and ByRef doesnt work together. Is there a way to pass along a control by referrence?

 
Old October 8th, 2005, 08:42 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post
Default

Just out of curiosity, why do you think you need to define a property using a byref argument? What are you trying to accomplish with a byref argument?

Jeff Mason
Custom Apps, Inc.
www.custom-apps.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
ByRef Argument! Apocolypse2005 Beginning VB 6 11 August 9th, 2007 02:21 PM
byRef ? g2000 Classic ASP Basics 0 August 18th, 2005 09:37 AM
ByRef and ByVal kgs51 Beginning VB 6 2 November 2nd, 2004 08:09 PM
Arrays seem to be passed byRef always srbeckle VB.NET 2002/2003 Basics 0 July 25th, 2003 10:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.