473,549 Members | 2,784 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1131
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*****@discus sions.microsoft .com> a écrit dans le message de
news:38******** *************** ***********@mic rosoft.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*****@discus sions.microsoft .com> a écrit dans le message de
news:38******** *************** ***********@mic rosoft.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
2639
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 information for Office automation than the c# groups. I am having some problems manipulating the various object models. I say various because...
5
4619
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 imagebutton control) I would like to change the name of the BorderColor property to InnerBorderColor because it would make more sense in the context of this...
3
10877
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 coding standards/best practices. Several of the documents I've read require that all members be private (or protected), and the get/set...
2
1163
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, Request.QueryString)); Info is a class that I call that places all data retrieved from a db into public properties.
4
2499
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 I have exposed a public property containing the value of a textbox in a user control..how do I grab this from the calling page? I cant think of the...
4
2058
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: -------------------------------- Public Class public_person
27
2689
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. What is the normal way to do this? Thanks, Thomas --
0
1561
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 the columns of the datagrid... The public properties with a primitive type are shown The public properties with userdefined types are also shown,...
4
1569
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 public readonly properties generally frowned upon? If so, then are there any generally accepted cases where they are considered as okay? Please...
5
1283
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 completely wrong I changed it to private and the example application containing this class Card works just as good as having the accessibility set to...
0
7518
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7446
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7956
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6040
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5368
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3480
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1935
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1057
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
757
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.