473,409 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

problem with me.name

Ok I have a control that is inherited from another class. In the child I
put msgbox(me.name) in the load event. What always pops up is the name of
the parent class and not the name of the instance of the object. WHY? Also
if I can figure this out I'm hoping that I can put this in the load event of
the parent and still get it to work.
Nov 21 '05 #1
14 3232
Try MyClass.Name instead of Me.Name.
"Altman" <No******@SickOfSpam.com> wrote in message
news:e2**************@TK2MSFTNGP09.phx.gbl...
Ok I have a control that is inherited from another class. In the child I
put msgbox(me.name) in the load event. What always pops up is the name of
the parent class and not the name of the instance of the object. WHY?
Also if I can figure this out I'm hoping that I can put this in the load
event of the parent and still get it to work.

Nov 21 '05 #2
That doesn't work either. Here is a little more specifics.

I have a class called BaseControl
I have a class called Bin which inherits basecontrol

I put the bin on a form and in the name property I filled it in with Bin1.
When I put myclass.name or me.name or mybase.name in a msgbox() in the load
event of either the basecontrol class or the Bin class I always get "Bin"
and I want it to say "Bin1."

"Scott M." <s-***@nospam.nospam> wrote in message
news:eF**************@tk2msftngp13.phx.gbl...
Try MyClass.Name instead of Me.Name.
"Altman" <No******@SickOfSpam.com> wrote in message
news:e2**************@TK2MSFTNGP09.phx.gbl...
Ok I have a control that is inherited from another class. In the child I
put msgbox(me.name) in the load event. What always pops up is the name
of the parent class and not the name of the instance of the object. WHY?
Also if I can figure this out I'm hoping that I can put this in the load
event of the parent and still get it to work.


Nov 21 '05 #3
Altman,

I do not understand you, when you see this code, what is than going wrong in
your opinion. Do not do it this way, this is only to test.
\\\
Class mytextbox
Inherits System.Windows.Forms.TextBox
Friend Sub showname()
Me.Name = "myname"
MessageBox.Show(Me.Name)
End Sub
End Class
Class Runner
Private name As String = "mytest"
Friend Sub run()
Dim mytexb As New mytextbox
MessageBox.Show(Me.name)
mytexb.showname()
End Sub
End Class
Class mytest
Public Shared Sub main()
Dim a As New Runner
a.run()
End Sub
End Class
////

"Altman" <No******@SickOfSpam.com>

Ok I have a control that is inherited from another class. In the child I
put msgbox(me.name) in the load event. What always pops up is the name of
the parent class and not the name of the instance of the object. WHY?
Also if I can figure this out I'm hoping that I can put this in the load
event of the parent and still get it to work.

Nov 21 '05 #4
"Altman" <No******@SickOfSpam.com> schrieb:
Ok I have a control that is inherited from another class.
In the child I put msgbox(me.name) in the load event. What
always pops up is the name of the parent class and not the
name of the instance of the object.


The name of the parent class is the same as the name of your class, because
your object is an instance of its base class too. 'Name' is inherited, not
duplicated.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #5
Altman,
Can you post the code in your Load event?

Are you talking the Load event of the control or the load event of the form?

It sounds like you are calling MsbBox before the InitializeComponent call of
the form, you should be calling it after, as the Name property should be set
inside the InitializeComponent method of the form.

Also verify that the Name property is indeed being set inside the
InitializeComponent method.

I don't remember when the load event of the control itself is called,
however it may be before the form has a chance to set the Name property of
the control, I would put a break point in both the control's load event &
the form's InitializeComponent to verify.

Hope this helps
Jay

"Altman" <No******@SickOfSpam.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
That doesn't work either. Here is a little more specifics.

I have a class called BaseControl
I have a class called Bin which inherits basecontrol

I put the bin on a form and in the name property I filled it in with Bin1.
When I put myclass.name or me.name or mybase.name in a msgbox() in the
load event of either the basecontrol class or the Bin class I always get
"Bin" and I want it to say "Bin1."

"Scott M." <s-***@nospam.nospam> wrote in message
news:eF**************@tk2msftngp13.phx.gbl...
Try MyClass.Name instead of Me.Name.
"Altman" <No******@SickOfSpam.com> wrote in message
news:e2**************@TK2MSFTNGP09.phx.gbl...
Ok I have a control that is inherited from another class. In the child
I put msgbox(me.name) in the load event. What always pops up is the
name of the parent class and not the name of the instance of the object.
WHY? Also if I can figure this out I'm hoping that I can put this in the
load event of the parent and still get it to work.



Nov 21 '05 #6
I guess that what I am noticing is that any property that I set in the
design mode does not show up with the correct value in the load event. I
have changed other properties in design mode and I noticed that at the load
event, these values are not there. When are the values that I set in design
mode available?

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uF**************@TK2MSFTNGP09.phx.gbl...
"Altman" <No******@SickOfSpam.com> schrieb:
Ok I have a control that is inherited from another class.
In the child I put msgbox(me.name) in the load event. What
always pops up is the name of the parent class and not the
name of the instance of the object.


The name of the parent class is the same as the name of your class,
because your object is an instance of its base class too. 'Name' is
inherited, not duplicated.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #7
It has to be that the load event is happening before the name is being
initialized. So far this is the only work around I can think of. I created
a variable called lFirstRun and initialized it true. Then I put this code
in the paint event and it seems to work.

If lFirstRun then
lFirstRun = false
msgbox(me.name)
End if
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:ua**************@TK2MSFTNGP10.phx.gbl...
Altman,
Can you post the code in your Load event?

Are you talking the Load event of the control or the load event of the
form?

It sounds like you are calling MsbBox before the InitializeComponent call
of the form, you should be calling it after, as the Name property should
be set inside the InitializeComponent method of the form.

Also verify that the Name property is indeed being set inside the
InitializeComponent method.

I don't remember when the load event of the control itself is called,
however it may be before the form has a chance to set the Name property of
the control, I would put a break point in both the control's load event &
the form's InitializeComponent to verify.

Hope this helps
Jay

"Altman" <No******@SickOfSpam.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
That doesn't work either. Here is a little more specifics.

I have a class called BaseControl
I have a class called Bin which inherits basecontrol

I put the bin on a form and in the name property I filled it in with
Bin1. When I put myclass.name or me.name or mybase.name in a msgbox() in
the load event of either the basecontrol class or the Bin class I always
get "Bin" and I want it to say "Bin1."

"Scott M." <s-***@nospam.nospam> wrote in message
news:eF**************@tk2msftngp13.phx.gbl...
Try MyClass.Name instead of Me.Name.
"Altman" <No******@SickOfSpam.com> wrote in message
news:e2**************@TK2MSFTNGP09.phx.gbl...
Ok I have a control that is inherited from another class. In the child
I put msgbox(me.name) in the load event. What always pops up is the
name of the parent class and not the name of the instance of the
object. WHY? Also if I can figure this out I'm hoping that I can put
this in the load event of the parent and still get it to work.



Nov 21 '05 #8
"Altman" <No******@SickOfSpam.com> schrieb:
I guess that what I am noticing is that any property that
I set in the design mode does not show up with the
correct value in the load event.


That's not desired behavior. The values set in the properties window should
be set when 'Load' is raised. Mhm... Maybe you can post the code of your
form's constructor and 'Sub InitializeComponent'?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #9
Altman,
Again: Are you talking the Load event of the control or the load event of
the form?

Can you more accurately describe what you are attempting & what you are
doing, so that we can actually help you, rather then making "guessing" on
what you are doing.

In other words: What are you really trying to do with the Name, and why do
you think you need to do it in the Load event? Don't forget we are not
really sure which Load event you are referring to.

Hope this helps
Jay

"Altman" <No******@SickOfSpam.com> wrote in message
news:uX**************@tk2msftngp13.phx.gbl...
It has to be that the load event is happening before the name is being
initialized. So far this is the only work around I can think of. I
created a variable called lFirstRun and initialized it true. Then I put
this code in the paint event and it seems to work.

If lFirstRun then
lFirstRun = false
msgbox(me.name)
End if
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:ua**************@TK2MSFTNGP10.phx.gbl...
Altman,
Can you post the code in your Load event?

Are you talking the Load event of the control or the load event of the
form?

It sounds like you are calling MsbBox before the InitializeComponent call
of the form, you should be calling it after, as the Name property should
be set inside the InitializeComponent method of the form.

Also verify that the Name property is indeed being set inside the
InitializeComponent method.

I don't remember when the load event of the control itself is called,
however it may be before the form has a chance to set the Name property
of the control, I would put a break point in both the control's load
event & the form's InitializeComponent to verify.

Hope this helps
Jay

"Altman" <No******@SickOfSpam.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
That doesn't work either. Here is a little more specifics.

I have a class called BaseControl
I have a class called Bin which inherits basecontrol

I put the bin on a form and in the name property I filled it in with
Bin1. When I put myclass.name or me.name or mybase.name in a msgbox() in
the load event of either the basecontrol class or the Bin class I always
get "Bin" and I want it to say "Bin1."

"Scott M." <s-***@nospam.nospam> wrote in message
news:eF**************@tk2msftngp13.phx.gbl...
Try MyClass.Name instead of Me.Name.
"Altman" <No******@SickOfSpam.com> wrote in message
news:e2**************@TK2MSFTNGP09.phx.gbl...
> Ok I have a control that is inherited from another class. In the
> child I put msgbox(me.name) in the load event. What always pops up is
> the name of the parent class and not the name of the instance of the
> object. WHY? Also if I can figure this out I'm hoping that I can put
> this in the load event of the parent and still get it to work.
>



Nov 21 '05 #10
Altman,
When are the values that I set in design mode available? At run time, the values you set at design time are available when you set
them, hence you need to do "something" with them in the Property Set
procedures. HOWEVER! the "do "something"" is the tricky part, for example in
a Color property the Property Set procedure may save the color value, and
then call Invalidate on the control, allowing the Paint event to repaint the
control in the new color...

Also remember that you can actually set the values at any time you want...

What are you wanting to do with them at Load time? Specifically.

Hope this helps
Jay

"Altman" <No******@SickOfSpam.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...I guess that what I am noticing is that any property that I set in the
design mode does not show up with the correct value in the load event. I
have changed other properties in design mode and I noticed that at the load
event, these values are not there. When are the values that I set in
design mode available?

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uF**************@TK2MSFTNGP09.phx.gbl...
"Altman" <No******@SickOfSpam.com> schrieb:
Ok I have a control that is inherited from another class.
In the child I put msgbox(me.name) in the load event. What
always pops up is the name of the parent class and not the
name of the instance of the object.


The name of the parent class is the same as the name of your class,
because your object is an instance of its base class too. 'Name' is
inherited, not duplicated.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>


Nov 21 '05 #11
it is in the load event of the control. Basically the reason I am doing
this is I have a property that I want it to read an external file for. This
way I can set this property outside the development environment based on
what is needed. I am actually doing this through an ini file right now
where each object will look for its name in the ini file and retrieve its
value. This is why I need the name. I thought about making a different
property for this but I figured the name property works best and I know that
it will not be duplicated. So upon loading of the control I want it to go
read the ini file where it's name is located and retrieve a value. So the
code is in the load event of the control, not the form.

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:us**************@TK2MSFTNGP12.phx.gbl...
Altman,
Again: Are you talking the Load event of the control or the load event of
the form?

Can you more accurately describe what you are attempting & what you are
doing, so that we can actually help you, rather then making "guessing" on
what you are doing.

In other words: What are you really trying to do with the Name, and why do
you think you need to do it in the Load event? Don't forget we are not
really sure which Load event you are referring to.

Hope this helps
Jay

"Altman" <No******@SickOfSpam.com> wrote in message
news:uX**************@tk2msftngp13.phx.gbl...
It has to be that the load event is happening before the name is being
initialized. So far this is the only work around I can think of. I
created a variable called lFirstRun and initialized it true. Then I put
this code in the paint event and it seems to work.

If lFirstRun then
lFirstRun = false
msgbox(me.name)
End if
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:ua**************@TK2MSFTNGP10.phx.gbl...
Altman,
Can you post the code in your Load event?

Are you talking the Load event of the control or the load event of the
form?

It sounds like you are calling MsbBox before the InitializeComponent
call of the form, you should be calling it after, as the Name property
should be set inside the InitializeComponent method of the form.

Also verify that the Name property is indeed being set inside the
InitializeComponent method.

I don't remember when the load event of the control itself is called,
however it may be before the form has a chance to set the Name property
of the control, I would put a break point in both the control's load
event & the form's InitializeComponent to verify.

Hope this helps
Jay

"Altman" <No******@SickOfSpam.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
That doesn't work either. Here is a little more specifics.

I have a class called BaseControl
I have a class called Bin which inherits basecontrol

I put the bin on a form and in the name property I filled it in with
Bin1. When I put myclass.name or me.name or mybase.name in a msgbox()
in the load event of either the basecontrol class or the Bin class I
always get "Bin" and I want it to say "Bin1."

"Scott M." <s-***@nospam.nospam> wrote in message
news:eF**************@tk2msftngp13.phx.gbl...
> Try MyClass.Name instead of Me.Name.
>
>
> "Altman" <No******@SickOfSpam.com> wrote in message
> news:e2**************@TK2MSFTNGP09.phx.gbl...
>> Ok I have a control that is inherited from another class. In the
>> child I put msgbox(me.name) in the load event. What always pops up
>> is the name of the parent class and not the name of the instance of
>> the object. WHY? Also if I can figure this out I'm hoping that I can
>> put this in the load event of the parent and still get it to work.
>>
>
>



Nov 21 '05 #12
here is my code. I am somewhat of a newbie to VB.net but have done alot of
programming in FoxPro.

Imports System.Text

<Serializable()> Public Class BaseControl

Inherits System.Windows.Forms.UserControl

Private lFirstRun As Boolean

#Region " Windows Form Designer generated code "

Public Sub New()

MyBase.New()

Dim ctl As Object, myForm As System.Windows.Forms.Form

'This call is required by the Windows Form Designer.

InitializeComponent()

lFirstRun = True

'Add any initialization after the InitializeComponent() call

End Sub

'UserControl overrides dispose to clean up the component list.

Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)

If disposing Then

If Not (components Is Nothing) Then

components.Dispose()

End If

End If

MyBase.Dispose(disposing)

End Sub

'Required by the Windows Form Designer

Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer

'It can be modified using the Windows Form Designer.

'Do not modify it using the code editor.

<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

'

'BaseControl

'

Me.Name = "BaseControl"

End Sub

#End Region

Private Declare Ansi Function GetPrivateProfileString Lib "kernel32" _

Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As
String, ByVal _

lpKeyName As String, ByVal lpDefault As String, ByVal
lpReturnedString As _

StringBuilder, ByVal nSize As Int32, ByVal lpFileName As String)
As Int32

Private Declare Ansi Function WritePrivateProfileString _

Lib "kernel32.dll" Alias "WritePrivateProfileStringA" _

(ByVal lpApplicationName As String, _

ByVal lpKeyName As String, ByVal lpString As String, _

ByVal lpFileName As String) As Integer

Private m_ioValue As Boolean, m_IO As Short, m_ioMaster As IOMaster,
m_ioObject As IO

Protected Const INIFILE = "HMI.ini"

#Region "Properties"

Public Property IOValue() As Boolean

Get

IOValue = m_ioValue

End Get

Set(ByVal Value As Boolean)

Value = m_ioValue

End Set

End Property

Public Property IO() As Short

Get

IO = m_IO

End Get

Set(ByVal Value As Short)

m_IO = Value

addHandlerEvent()

End Set

End Property

Public Property IOMaster() As IOMaster

Get

IOMaster = m_ioMaster

End Get

Set(ByVal Value As IOMaster)

m_ioMaster = Value

addHandlerEvent()

End Set

End Property

#End Region

#Region "Subs and Functions"

Private Sub addHandlerEvent()

'remove the old handler if there is one

If Not m_ioObject Is Nothing Then

RemoveHandler m_ioObject.IOChange, AddressOf Me.ChangeIOValue

End If

If Not m_ioMaster Is Nothing And m_IO > 0 Then

m_ioObject = m_ioMaster.IOObject(m_IO)

If Not m_ioObject Is Nothing Then

'bind the changeIovalue sub to the event IOChange of the io
object

AddHandler m_ioObject.IOChange, AddressOf Me.ChangeIOValue

Else

'MsgBox("ioobject is nothing")

End If

Else

'MsgBox("iomaster is nothing " & m_IO.ToString)

End If

End Sub

Private Sub ChangeIOValue()

'The io Value changed so update the data and raise the IOChange
Event

m_ioValue = m_ioObject.IOValue

RaiseEvent IOChange()

End Sub

Protected Overridable Sub GetIO()

Dim RetVal As StringBuilder, X As Integer

RetVal = New StringBuilder(255)

X = GetPrivateProfileString("IO", Me.Name, "", RetVal, 255, CurDir()
& "\" & INIFILE)

If X > 0 Then

Me.IO = Val(RetVal.ToString)

Else

WritePrivateProfileString("IO", Me.Name, "0", CurDir() & "\" &
INIFILE)

End If

End Sub

#End Region

Public Event IOChange()

Private Sub BaseControl_Paint(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint

If lFirstRun Then

lFirstRun = False

GetIO()

End If

End Sub

End Class
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:e1**************@TK2MSFTNGP10.phx.gbl...
Altman,
When are the values that I set in design mode available?

At run time, the values you set at design time are available when you set
them, hence you need to do "something" with them in the Property Set
procedures. HOWEVER! the "do "something"" is the tricky part, for example
in a Color property the Property Set procedure may save the color value,
and then call Invalidate on the control, allowing the Paint event to
repaint the control in the new color...

Also remember that you can actually set the values at any time you want...

What are you wanting to do with them at Load time? Specifically.

Hope this helps
Jay

"Altman" <No******@SickOfSpam.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
I guess that what I am noticing is that any property that I set in the
design mode does not show up with the correct value in the load event. I
have changed other properties in design mode and I noticed that at the
load event, these values are not there. When are the values that I set in
design mode available?

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uF**************@TK2MSFTNGP09.phx.gbl...
"Altman" <No******@SickOfSpam.com> schrieb:
Ok I have a control that is inherited from another class.
In the child I put msgbox(me.name) in the load event. What
always pops up is the name of the parent class and not the
name of the instance of the object.

The name of the parent class is the same as the name of your class,
because your object is an instance of its base class too. 'Name' is
inherited, not duplicated.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>



Nov 21 '05 #13
Oh btw I was calling GetIO() from the load event and that wasn't working. I
moved it to the Paint event and now it works. If there is anyway to get it
to work in the load event, that is where I'd rather have it.
Nov 21 '05 #14
Altman,
Can you post the code in your Load event?
I think we need to see your code! Actually a simple user control such as
below, that accurately displays your problem.

I just created a simple UserControl in VS.NET 2003 and the control's name is
set in the UserControl's Load event.

As you can see from the following control, I simply created a new User
Control, and added MessageBox.Show to the Load event handler...

I then added one of my UserControl1 to the designer of my form and set its
Name property.
Public Class UserControl1
Inherits System.Windows.Forms.UserControl

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'UserControl overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
components = New System.ComponentModel.Container
End Sub

#End Region

Private Sub UserControl1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Load
MessageBox.Show(Me.Name, "Load")
End Sub

End Class

Hope this helps
Jay
"Altman" <No******@SickOfSpam.com> wrote in message
news:ux**************@TK2MSFTNGP15.phx.gbl... it is in the load event of the control. Basically the reason I am doing
this is I have a property that I want it to read an external file for.
This way I can set this property outside the development environment based
on what is needed. I am actually doing this through an ini file right now
where each object will look for its name in the ini file and retrieve its
value. This is why I need the name. I thought about making a different
property for this but I figured the name property works best and I know
that it will not be duplicated. So upon loading of the control I want it
to go read the ini file where it's name is located and retrieve a value.
So the code is in the load event of the control, not the form.

"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:us**************@TK2MSFTNGP12.phx.gbl...
Altman,
Again: Are you talking the Load event of the control or the load event of
the form?

Can you more accurately describe what you are attempting & what you are
doing, so that we can actually help you, rather then making "guessing" on
what you are doing.

In other words: What are you really trying to do with the Name, and why
do you think you need to do it in the Load event? Don't forget we are not
really sure which Load event you are referring to.

Hope this helps
Jay

"Altman" <No******@SickOfSpam.com> wrote in message
news:uX**************@tk2msftngp13.phx.gbl...
It has to be that the load event is happening before the name is being
initialized. So far this is the only work around I can think of. I
created a variable called lFirstRun and initialized it true. Then I put
this code in the paint event and it seems to work.

If lFirstRun then
lFirstRun = false
msgbox(me.name)
End if
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in
message news:ua**************@TK2MSFTNGP10.phx.gbl...
Altman,
Can you post the code in your Load event?

Are you talking the Load event of the control or the load event of the
form?

It sounds like you are calling MsbBox before the InitializeComponent
call of the form, you should be calling it after, as the Name property
should be set inside the InitializeComponent method of the form.

Also verify that the Name property is indeed being set inside the
InitializeComponent method.

I don't remember when the load event of the control itself is called,
however it may be before the form has a chance to set the Name property
of the control, I would put a break point in both the control's load
event & the form's InitializeComponent to verify.

Hope this helps
Jay

"Altman" <No******@SickOfSpam.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
> That doesn't work either. Here is a little more specifics.
>
> I have a class called BaseControl
> I have a class called Bin which inherits basecontrol
>
> I put the bin on a form and in the name property I filled it in with
> Bin1. When I put myclass.name or me.name or mybase.name in a msgbox()
> in the load event of either the basecontrol class or the Bin class I
> always get "Bin" and I want it to say "Bin1."
>
> "Scott M." <s-***@nospam.nospam> wrote in message
> news:eF**************@tk2msftngp13.phx.gbl...
>> Try MyClass.Name instead of Me.Name.
>>
>>
>> "Altman" <No******@SickOfSpam.com> wrote in message
>> news:e2**************@TK2MSFTNGP09.phx.gbl...
>>> Ok I have a control that is inherited from another class. In the
>>> child I put msgbox(me.name) in the load event. What always pops up
>>> is the name of the parent class and not the name of the instance of
>>> the object. WHY? Also if I can figure this out I'm hoping that I can
>>> put this in the load event of the parent and still get it to work.
>>>
>>
>>
>
>



Nov 21 '05 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: nanookfan | last post by:
Hi all, I'm having a bizarre problem converting XML files to HTML using an XSLT. The problem is only occuring in my Netscape 7.0 browser. What makes it more bizarre is that it is only...
5
by: Clifford W. Racz | last post by:
Has anyone solved the issue of translating lists in Word 2003 (WordML) into xHTML? I have been trying to get the nested table code for my XSLT to work for a while now, with no way to get the...
2
by: yqlu | last post by:
I hava developed a client in C# that is connected to a 3-party XML Web Services developed in Java based on the AXIS 1.1. Most methods call are successful except for one method named "findObjects"...
5
by: Dany C. | last post by:
We have install a valid SSL certificate issued to www.mycompany.com on our web server running IIS 6.0 / win2003 SP1. Then we have created a sub domain pointing to the same server for our web...
6
by: TPJ | last post by:
Help me please, because I really don't get it. I think it's some stupid mistake I make, but I just can't find it. I have been thinking about it for three days so far and I still haven't found any...
5
by: rocknbil | last post by:
Hello everyone! I'm new here but have been programming for the web in various languages for 15 years or so. I'm certainly no "expert" but can keep myself out of trouble (or in it?) most of the time....
3
by: iskeletor | last post by:
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #define STUDENT_NUMBER 68 #define ARRAY_LENGTH 10 struct node{ char Name,Surname; int data,no;
2
by: Ravi Joshi | last post by:
The menu on my site works fine in IE6 and Firefox. In IE7, there is a problem with the menu: when you mouse over the various main catagories, the sub-catagories all appear to the right as they...
6
by: jephperro | last post by:
Hi there, I'm having a really tough time with a SQL statement and I am wondering if someone is able to help out or point me in the right direction. I have a table of names which can be very...
4
by: liberty1 | last post by:
Hi everyone. I appreciate your effort at helping newbies like me. I have the following problems and will appreciate urgent help. PROBLEM NUMBER 1: Using PHP and MySQL, I am able to upload...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.