Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > Pro VB.NET 2002/2003
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 23rd, 2003, 04:39 AM
Authorized User
Join Date: Jun 2003
Location: Norfolk, , United Kingdom.
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default User Controls

Hi Guys

I'm creating a User Control, one of the controls required is a textbox. When I add the text box to the user control I can see all the usuall properties of the text box. But when I add the user control to the form in the project only some of the properties are visible. The property I require is the CharacterCasing, I can get this property to appear by adding a Public property to the user control code, but I keep getting an overflow error when setting the property.

<Category("Apperance"), Description("Sets text Casing"), Browsable(True), Defaultvalue("Normal")>_
Public Property Casing as CharacterCasing
Return Casing
End Get
Set (ByVal Value as CharacterCasing)
Casing = Value
End set
End Property

A Little help required, Thanks

Reply With Quote
  #2 (permalink)  
Old October 27th, 2003, 12:51 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

Your overflow is most likely being caused by the circular reference in the property:

Public Property Casing as CharacterCasing
        Return Casing
    End Get
    Set (ByVal Value as CharacterCasing)
        Casing = Value
    End set
End Property

That code calls itself. Sounds like what you want to do is use this property to access the property of your text box:

Public Property Casing as CharacterCasing
        Return textbox1.CharacterCasing
    End Get
    Set (ByVal Value as CharacterCasing)
        textbox1.CharacterCasing = Value
    End set
End Property

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
User controls dcct84 C# 2 October 28th, 2007 07:20 PM
User controls' content: Chapter 2 User Controls AGS BOOK: Professional ASP.NET 2.0 Server Control and Component Development ISBN: 978-0-471-79350-2 10 July 26th, 2007 05:36 AM
User Controls Lofa ASP.NET 1.0 and 1.1 Basics 2 February 13th, 2006 01:04 PM
User Controls..... Help please cowboy2066 General .NET 2 July 28th, 2004 09:22 AM
User Controls Duncan Pro VB.NET 2002/2003 2 December 1st, 2003 05:41 AM

All times are GMT -4. The time now is 03:10 PM.

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