473,385 Members | 1,863 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,385 software developers and data experts.

Public Properties

Hello.
I have a mdi parent form, and I want to change the values of its
status bar
from child forms, I tried with public properties, but it only works in
the
mdiparet, not from a child from...
... here is the code
Public Property myStatusBarText() As String
Get
Return sbMain.Panels(1).Text()
' Return textoControl
End Get
Set(ByVal Value As String)
' Only allow Set operation for values less than 10.
sbMain.Panels(1).Text = Value
End Set
End Property

how do I use it from child forms????

Jul 26 '05 #1
2 1125
Please always tell what you mean by "doesn't work"...

What have you tried and what fails ? Could it be a casting problem ? Have
you tried to cast the MdiParent property to the type of this form ?

--
Patrice

"Edinson" <Ed*****@discussions.microsoft.com> a écrit dans le message de
news:38**********************************@microsof t.com...
Hello.
I have a mdi parent form, and I want to change the values of its
status bar
from child forms, I tried with public properties, but it only works in
the
mdiparet, not from a child from...
... here is the code
Public Property myStatusBarText() As String
Get
Return sbMain.Panels(1).Text()
' Return textoControl
End Get
Set(ByVal Value As String)
' Only allow Set operation for values less than 10.
sbMain.Panels(1).Text = Value
End Set
End Property

how do I use it from child forms????

Jul 26 '05 #2

Thanx Patrice.... I have resolvet it... I had not declared my mdi parent in
my sub main. it is working now.

"Patrice" wrote:
Please always tell what you mean by "doesn't work"...

What have you tried and what fails ? Could it be a casting problem ? Have
you tried to cast the MdiParent property to the type of this form ?

--
Patrice

"Edinson" <Ed*****@discussions.microsoft.com> a écrit dans le message de
news:38**********************************@microsof t.com...
Hello.
I have a mdi parent form, and I want to change the values of its
status bar
from child forms, I tried with public properties, but it only works in
the
mdiparet, not from a child from...
... here is the code
Public Property myStatusBarText() As String
Get
Return sbMain.Panels(1).Text()
' Return textoControl
End Get
Set(ByVal Value As String)
' Only allow Set operation for values less than 10.
sbMain.Panels(1).Text = Value
End Set
End Property

how do I use it from child forms????


Jul 26 '05 #3

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

Similar topics

0
by: john bailo | last post by:
I am attempting to create a c# program to iterate through the messages in an Outlook/Exchange public folder and extract the headers. My apologies to the VB/VBA groups, but you seem to have more...
5
by: Earl Teigrob | last post by:
Is there a way to rename the public properties of a inherited class? I am inheriting an asp.net control (class) and am adding addtional functionality. (in this case, up to 3 borders on an...
3
by: Joe Fromm | last post by:
Perhaps I'm missing something obvious, but I've been curious about one of the coding practices I see advocated. I'm a longtime C/C++ programmer trying to learn C#, and I started looking around for...
2
by: pietaster | last post by:
I really dont know what I should do. I am asking for best practices. currently I create my properties by doing this. Context.Items.Add("Info", new Info(Request.QueryString,...
4
by: louise raisbeck | last post by:
Resending this as own topic as didnt get answer from original. Would be grateful for a response from anyone that knows. Thanks. Hi there, I found your post really helpful..but i wondered if, once...
4
by: Webster | last post by:
Hello, Just wondering what's better programming style; to use public variables in a class or to use private/protected variables and then expose them via properties? For example:...
27
by: thomasp | last post by:
Variables that I would like to make available to all forms and modules in my program, where should I declare them? At the momment I just created a module and have them all declared public there. ...
0
by: mvanroshum | last post by:
Hi, I have the following problem: The DataSource of a DataGrid can be set to an IList. The DataGrid nicely lists the objects in the IList, showing all the public properties of the objects as...
4
by: Smithers | last post by:
I understand there is no "right" or "wrong" answer to the question posited below. But I'd appreciate some feedback on the "best practice" considerations - if there are any. So here goes: Are...
5
by: Tony Johansson | last post by:
Hello! This class Card displayed below is from a book called "Visual Studio 2005". Now to my question here they haved used accessibility of public for the two field suit and rank This is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.