473,320 Members | 2,133 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,320 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 1122
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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.