Click here to Skip to main content
15,896,453 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionDate Design Suggestion... Pin
smjunior0927-May-09 7:36
smjunior0927-May-09 7:36 
AnswerRe: Date Design Suggestion... Pin
Dave Kreskowiak27-May-09 7:46
mveDave Kreskowiak27-May-09 7:46 
GeneralRe: Date Design Suggestion... Pin
smjunior0927-May-09 7:53
smjunior0927-May-09 7:53 
GeneralRe: Date Design Suggestion... Pin
Dave Kreskowiak27-May-09 10:22
mveDave Kreskowiak27-May-09 10:22 
QuestionSubclass a Control by UserControl Pin
Samir Ibrahim27-May-09 6:36
Samir Ibrahim27-May-09 6:36 
AnswerRe: Subclass a Control by UserControl Pin
EliottA27-May-09 7:03
EliottA27-May-09 7:03 
GeneralRe: Subclass a Control by UserControl Pin
Samir Ibrahim27-May-09 21:37
Samir Ibrahim27-May-09 21:37 
AnswerRe: Subclass a Control by UserControl Pin
Dave Kreskowiak27-May-09 7:10
mveDave Kreskowiak27-May-09 7:10 
Samir Ibrahim wrote:
1- Why it gives warning in 'Me.Version = "1.0"


Because the Get part of the property must return a value to the caller and your code apparently doesn't do that. Since a Version property should never be set by a caller, your code should read, as a ReadOnly property:
Public Class MyControl
    Private Const m_Version As String = "1.0"
    Public ReadOnly Property Version() As String
        Get
            Return m_Version
        End Get
    End Property
End Class

Seriously, pick up a beginners book on VB.NET. The problem you're having has nothing to do with subclassing or anything of the sort. You're missing a basic understanding of how Properties work.


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




GeneralRe: Subclass a Control by UserControl Pin
Samir Ibrahim27-May-09 21:36
Samir Ibrahim27-May-09 21:36 
GeneralRe: Subclass a Control by UserControl Pin
Dave Kreskowiak28-May-09 2:19
mveDave Kreskowiak28-May-09 2:19 
GeneralRe: Subclass a Control by UserControl Pin
Samir Ibrahim28-May-09 3:46
Samir Ibrahim28-May-09 3:46 
GeneralRe: Subclass a Control by UserControl Pin
Nagy Vilmos28-May-09 3:56
professionalNagy Vilmos28-May-09 3:56 
GeneralRe: Subclass a Control by UserControl Pin
Samir Ibrahim28-May-09 4:19
Samir Ibrahim28-May-09 4:19 
GeneralRe: Subclass a Control by UserControl Pin
Nagy Vilmos28-May-09 4:35
professionalNagy Vilmos28-May-09 4:35 
GeneralRe: Subclass a Control by UserControl Pin
Dave Kreskowiak28-May-09 5:38
mveDave Kreskowiak28-May-09 5:38 
GeneralRe: Subclass a Control by UserControl Pin
Dave Kreskowiak28-May-09 4:21
mveDave Kreskowiak28-May-09 4:21 
GeneralRe: Subclass a Control by UserControl Pin
Trollslayer28-May-09 3:03
mentorTrollslayer28-May-09 3:03 
GeneralRe: Subclass a Control by UserControl Pin
Nagy Vilmos28-May-09 3:20
professionalNagy Vilmos28-May-09 3:20 
GeneralRe: Subclass a Control by UserControl Pin
Samir Ibrahim28-May-09 3:58
Samir Ibrahim28-May-09 3:58 
GeneralRe: Subclass a Control by UserControl Pin
EliottA28-May-09 5:32
EliottA28-May-09 5:32 
GeneralRe: Subclass a Control by UserControl Pin
Nagy Vilmos28-May-09 5:34
professionalNagy Vilmos28-May-09 5:34 
GeneralRe: Subclass a Control by UserControl Pin
Jerry Hammond28-May-09 3:41
Jerry Hammond28-May-09 3:41 
GeneralRe: Subclass a Control by UserControl Pin
Samir Ibrahim28-May-09 4:05
Samir Ibrahim28-May-09 4:05 
GeneralRe: Subclass a Control by UserControl Pin
#realJSOP28-May-09 4:07
professional#realJSOP28-May-09 4:07 
GeneralRe: Subclass a Control by UserControl Pin
Jon_Boy28-May-09 4:22
Jon_Boy28-May-09 4:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.