"Doubts" C # parent Form Subform

Source: Internet
Author: User
Tags md5 encryption

"Doubts" C # parent Form SubformThis question I learned at that time also puzzled for a long, today saw someone asked to explain the next ~ "Ask" the parent form calls the subform, how to display the subform close the parent form? "Answer" in the case of no thread, the main form can not be closed, a closed program exits, should be hidden, provides two ways: The simplest way: "Parent form plus"
Form2 F2 = new Form2 ();
F2. Show ();
This. Hide ();
"Expand" because the main form is just hidden, not the real sense of closing application.exit (); App exit
————————————————————
Common methods: (This method, when you close the subform also returns the parent form)
"Add in parent form"
Form2 F2 = new Form2 ();
F2. ShowDialog (this);//treat the current form as a message box
"Add in Subform"
Loading time: this. Owner.hide (); Parent form Hidden
When it is closed: this. Owner.show (); The parent form displays

Prevent you do not understand, I did 2 examples, the source code is as follows: Http://pan.baidu.com/s/1jG42pee
Feel the Space ~ ~ to contribute a few resources it ~
C#winform instance HTTP://PAN.BAIDU.COM/S/14CGHG;
Do you love me-source Http://pan.baidu.com/s/1gd3RG8F
C # Calculator-source Http://pan.baidu.com/s/1dD4C2zB
Socket Network Programming Client source + Server source code Http://pan.baidu.com/s/1dDkZB9Z
Process-oriented, flying chess game source Http://pan.baidu.com/s/1hql88IC
01. Manually create your own easy browser-source HTTP://PAN.BAIDU.COM/S/1BNGQOSN
02. Manually create two-dimensional code automatic generator-source Http://pan.baidu.com/s/1jGl46kI
03. Manually create your own picture viewer-source Code Http://pan.baidu.com/s/13vSXC 04. Create a lottery draw name System--source code Http://pan.baidu.com/s/1sjudRUt
05. Manually build your own simplified-source http://pan.baidu.com/s/1eQCbo9k
06. Build your own MD5 encryption gadget-source Http://pan.baidu.com/s/1pJLmraj 07. Build Your own C # Remote control series software Http://pan.baidu.com/s/1qWFKJhU more continue to see my little white C # The WinForm series is OK ~ ~

"Doubts" C # parent Form Subform

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.