mdiparent

Enable a TButton of an MDI ChildForm upon closing of another MDI ChildForm

送分小仙女□ 提交于 2020-01-30 03:29:45
问题 I have 2 MDI ChildForms and the Child1 has a TButton to open the Child2. I do not have any issue opening it at the same time disable the TButton to prevent Child2 from recreating again using TButton. Now, the challenge comes when I want the TButton of Child1 back to "enabled" when I closed the Child2. I am getting access error when doing these code: procedure TfrmChild2.FormClose(Sender: TObject; var Action: TCloseAction); begin child1_u.frmChild1.btnOpenChild2Form.Enabled := True; Action :=

Merge menu strip items for MDI windows

早过忘川 提交于 2019-12-31 01:06:12
问题 How can I merge menu items of parent form and child form with same menu name? 回答1: Set the MergeAction of the menu items to "MatchOnly". Added Because this can get a little tricky, I'll add a list of steps to make a simple example. Create a new Windows Forms Application. Add a new Windows Form and leave its name Form2. Open Form1 designer (if not already open). Click on the form and set Form1's IsMdiContainer to True. Open the toolbox and add a MenuStrip to Form1. In the "Type Here" box type

Set Wpf parent to a MDIform

江枫思渺然 提交于 2019-12-25 04:57:27
问题 I have a win form application with a MDI Form . for some reason i used a WPF Window in my application. so i want to ask how can i set WPF window parent to my MDI Form? 回答1: The following code should give you the ability to set the owner of the wpf dialog to your win form. public static void SetOwner(System.Windows.Forms.Form owner, System.Windows.Window wpfWindow) { WindowInteropHelper helper = new WindowInteropHelper(wpfWindow); helper.Owner = owner.Handle; } 回答2: There is an open-source MDI

mdiparent click

我与影子孤独终老i 提交于 2019-12-24 20:17:58
问题 The click ,double click on mdi parent of the .net MDI form does not work is it a bug? 回答1: Well, that's not much to go on without knowing exactly what you click on. The gray background of the parent is a separate control, an MdiClient, not the form. You'd register a click event for it with code like this: public Form1() { InitializeComponent(); foreach (var ctl in this.Controls) { if (ctl is MdiClient) { (ctl as MdiClient).Click += Client_Click; break; } } } private void Client_Click(object

MDI Parent Form Problem setting Parent

眉间皱痕 提交于 2019-12-20 02:47:15
问题 I am using a MDI parent form that has a childs and they show up very well when they are called up by this parent and i use to intensiate child form as ChildForm child = new ChildForm(); child.IsMdiContainer= this; child.Show(); works well as soon as they are called from parent control but if i call them from another form that is not child of any parent form then they no longer remains child of main parent one obvious reason is that when i intensiate them on that independent form is that I

How to remove gray background on MDI parent form?

江枫思渺然 提交于 2019-12-19 06:39:29
问题 What I'm trying to do is draw some glass on a form marked as an mdi container. However as soon as the IsMdiContainer is set, the form adds an MdiClient to it's list of Controls. At this point something happens to the parent form - almost like a dark gray panel is being docked to the entire form onto which the MdiClient is being placed on. I then do is the following to move the MdiClient control out of the way a bit: foreach(var c in Controls) { if(c is MdiClient) { var client = (MdiClient)c;

How to remove gray background on MDI parent form?

馋奶兔 提交于 2019-12-19 06:39:07
问题 What I'm trying to do is draw some glass on a form marked as an mdi container. However as soon as the IsMdiContainer is set, the form adds an MdiClient to it's list of Controls. At this point something happens to the parent form - almost like a dark gray panel is being docked to the entire form onto which the MdiClient is being placed on. I then do is the following to move the MdiClient control out of the way a bit: foreach(var c in Controls) { if(c is MdiClient) { var client = (MdiClient)c;

Winforms MDI “Desktop” Area Boundry

十年热恋 提交于 2019-12-14 01:13:05
问题 The default MDI parent control has a large "desktop" area that can display multiple child forms. Users can drag forms to the edge of this desktop area so that most of the child form is off the screen. (A scroll bar then appears in the MDI parent) I don't like this feature. Is there a way to lock down the edge of the desktop area so that the child forms remain fully visible? 回答1: Disable the MDI window scrollbars Hook the OnMove event of all child windows. If the window is moved outside the

SplitContainer's panel as the MDI parent for other forms

这一生的挚爱 提交于 2019-12-13 12:24:20
问题 I have got a control with a Splitcontainer added. I want to place another forms on the second panel ( Panel2 ). However, it is not possible to set the MDIParent property of a brand new form to Panel2 . Thus, the question is - how can I set the SplitContainer's panel as the MDIParent for another controls? Thank you in advance for the clues! cheers 回答1: An MDIParent can only be another Form. What you need to do is set TopLevel to False on the child Form. Then you can add it to any control just

How can I make MdiChild forms be in tabs in C#?

我的梦境 提交于 2019-12-12 09:41:43
问题 I have a MDIparent Forma and which has some mdichild forms in it. Can you help me some how put the mdichilds in Tabs like google chrome , firefox , IE , Opera ... 回答1: There's a good article on MDI forms with TabControls here: http://www.codeproject.com/KB/cs/MDITabBrowsing.aspx 回答2: There's nothing really to be gained by using MDI once you have tabs. MDI is designed to handle multiple forms residing inside the same container. However, with tabs each form is in a different container. I can't