-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: ChellaBala
Message 3 in Discussion
Hi Suraj, Your answer is perfect... I would like to refer the button pasted
in the form at runtime...As there is no Name property of the control available
in .Net Compact Framework, I am facing the following problem... How can I
find the name of an object at run time in .Net Compact Framework?
For eg.,
I need to go through the Controls Collection. Get all the Command buttons.
If it is commandbutton1 then apply Red color.
If it is commandbutton2 then apply Green color....
The command button texts varies from design time to run time. So I can't use
the text property. So, if I know the name of my commandbutton then I can
proceed further.
Do you have any idea on this? (Or) Is there any similar kind to refer the
command buttons present in Form2 (say for eg.)
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim asm As System.Reflection.Assembly =
System.Reflection.Assembly.GetExecutingAssembly
Dim objButton As Object = asm.CreateInstance(asm.GetName.Name +
".Form2" + ".Button1")
CType(objButton, Button).BackColor = Color.Red
End Sub
Regards,
Chella
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/BDOTNET/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]