473,320 Members | 2,012 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.

Accessing parent object...

I have a multiform program where
- Form1 is the main user gathering portion and processing
- Form2 has a rich text box that i want to use to display the report that
is generated by Form1

so in my form1 class definition i have...

public ref class Form1 : public System::Windows::Forms::Form
{
public:
myViewer^ mv; // this is defined in myViewer.h

Form1(void)
{
InitializeComponent()
mv = gcnew myViewer;
}
// bunch of code and eventually it comes to
mv->Visible = true;
}

Now in myViewer i have

private: System::Void myViewer_Load(//stuff)
{
TextReader^ sr = gcnew StreamReader(OutPutFileName->Text);

// Now dump sr into my rich text box.
}

OutputFileName is a text box that I define in Form1. How can I tell
myViewer to use this value?
Sep 7 '06 #1
0 906

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

Similar topics

5
by: Suzanne Vogel | last post by:
Hi, Given: I have a class with protected or private data members, some of them without accessor methods. It's someone else's class, so I can't change it. (eg, I can't add accessor methods to the...
3
by: Philip Parker | last post by:
hows it done? :/ i cant seem to access things in a "config" class i made the setup is something like this class IRCBot { OPTIONS Config IRCCONN Irc .... }
0
by: mollyf | last post by:
I have multiple user controls on a form. I have a save button on each control so the users can save as they go and on the parent form, I have another button which will save/update everything...
2
by: eagle | last post by:
How do I access a control, like a placeholder, from another page, or another user control that may be on the same page. For instance, I have a web page with 2 user controls. One user controls...
1
by: David L Wright II | last post by:
I am trying to access a mdi parent form's properties and methods outside of the mdi parent form's class module. I keep getting "Reference to a non-shared member requires an object reference"...
6
by: David Hearn | last post by:
I have a property in a user control that I am setting: Private strPageName as String Public Property PageName() as String Get Return strPageName End Get Set(byVal Value as String)...
4
by: raj_genius | last post by:
I hav two queries, whc are as follows: FIRSTLY: is it possible to access the controls(by name) of a parent form(MDI) from its child forms??if yes then how??plzz provide a coded example in VB if...
4
by: SteveT | last post by:
I am wanting to populate several treeviews, one for the <TRs> group and one for the <TGsgroup. Is there a simplier way to populate the Treeview than the one I did below? It seems difficult to...
8
by: RSH | last post by:
Hi, I have a situation where I have a Parent Object (Company) which has several public properties. The Company Object also creates an Employees object which has its ow set of functions and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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.