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

C#-APP: How I can control other forms in one form?

Exactly I create a main form and a sub form.There are several pictures on the main form.

what I want to do is when I select one picture in the main form,I want the sub form display that picture immediately and the control is not changed from the main to the sub.

very thanks!

Platform:
FrameWork3.5
Microsoft Visual C# 2008
Feb 22 '08 #1
2 1120
r035198x
13,262 8TB
Exactly I create a main form and a sub form.There are several pictures on the main form.

what I want to do is when I select one picture in the main form,I want the sub form display that picture immediately and the control is not changed from the main to the sub.

very thanks!

Platform:
FrameWork3.5
Microsoft Visual C# 2008
You need a handle(reference) of the sub form in the main form. Then in an event handler of the main form you can use that reference to change the properties of the sub form. In this approach, the sub form will ideally have been created from the main form.
The other approach is to have a Controller class that handles the creation and maintanace of all forms and is capable of passing data between all the forms. (All the forms will have a reference to this controller through their constructors )
Feb 22 '08 #2
very thanks!

I have done what you had told me to do.

A new problem troubles me,that is when I chaned the property of form_1 in the form_ 2.then I write:
form1.validate();
form1.Show();
what I want to know is to concern whether the form1 immediately be changed.
but I failed.can you show me other ways to see the form1 immediately?

thanks!
Feb 22 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: genetic.error | last post by:
I'm moving from Vb6 to VB.Net. I have a feeling this has come up before... The VS.Net MSDN file seems to state that the following should work: Form1.Show Form1.Visible = True Form1.Hide...
6
by: David | last post by:
Ok. Can PHP control a form value directly? Eg. like the javascript "document.Form1.text01.value = "Y"". Eg. allow me to put a value into a form text field on page load. Either I missed this in...
1
by: Marco Simone | last post by:
Hi, If someone can answer how to add calendar control on form, where you can choose date. I think there is Calendar control in ActiveX add in, but I don't know how to implement it. Thanks...
6
by: MP | last post by:
Hello I want to have a public property (and Brows able) in one control, I use this code: public System.Windows.Forms.Form recordForm get { return _recordForm;} set {_recordForm = value;}
0
by: Eugene | last post by:
Hi All, I uses System.Windows.Forms.Form.ActiveForm to get the form with the current control having the focus. However, I got a problem when my application pops up another ShowDialog form. The...
1
by: MLH | last post by:
I thought it was DoCmd.GoToPage - but that doesn't work for Tab Controls, it seems - only for forms with page breaks in them. Anybody know Syntax form moving from page-to-page (actually,...
2
by: MLH | last post by:
A97 Am having difficulty displaying graph in Form View that I see fine in graph control on form opened in design view. I know I'm doing something wrong. If I open the form in design view - I...
1
by: Wanjun Yu | last post by:
In C#, what control or form can display HTML? I know in Visual C++, the CHtmlView is the one, but I can't seem to find the couterpart in C#. Thanks. WJ
6
by: jojoba | last post by:
Hi, I am trying to create a .net webservice such that: When a user calls the service, the server creates a System.Windows.Forms.Form and shows it on the server screen. I know this sounds...
8
by: sheridan | last post by:
Hi. I'm hoping someone can shed some light on this bizarre problem that I have come accross. I have spent all evening trying to fix it with no luck! I have a frameless Windows.Forms form with...
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:
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...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.