mdichild

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 :=

Click on treeview node open a new MDI form, focus left on first form

有些话、适合烂在心里 提交于 2019-12-31 06:25:50
问题 I'm trying to open a new form after clicking a node in a treeview. In the first MDI form I have a treeview, when I click on a node in the tree view a 2nd MDI form is opened, but the first form keeps the focus. I want the new form to have the focus. I have noticed the first form's _Enter event is firing as if something is setting focus back to the first form. There is also a button on the first form that does the same function and it works great. I have a feeling the treeview has some special

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

Why aren't my MDI child forms showing a shadow?

做~自己de王妃 提交于 2019-12-30 11:03:39
问题 In my application when I make a form as a child form of my main MDI parent form, the child form stops showing Windows 7 default shadow effect behind forms. How do I get child forms shadow to show? Form obj = Application.OpenForms["My_form"]; if (obj != null) { obj.Focus(); } else { My_form c = new My_form(); c.MdiParent = this; c.Show(); } 回答1: This is normal, entirely by design. MDI child windows are not top-level windows, but rather a special type of child window that is designed to be

Bring MDIChild form to front if already open

醉酒当歌 提交于 2019-12-25 03:46:11
问题 I've been struggling to get this to work...I have a button on a MDIchild form that opens another MDIchild form, but if the form is already open, it does not recognize it and opens a new one instead of bringing it to front. This is the code i've got: Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click Dim MDIForm4 As New Form4 MDIForm4.MdiParent = Me MDIForm4.Show() End Sub This works for the button to open the new form, and then I tried adding this: If Not Form4

Is it possible to change size of minimized window in MDI C# Winforms

左心房为你撑大大i 提交于 2019-12-20 02:52:12
问题 Users complain that when they have several minimized windows in MDI container it's impossible to distinguish them unless they resore each. I wonder if it's possible to make minimized window a little bit wider so the text in the caption can contain 6 characters? Thanks in advance! 回答1: No, this is not possible. Windows determines the width of a minimized window using the current system parameters, and there's no way to change this dynamically for a single application without changing the

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

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

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

ShowDialog in mdi

寵の児 提交于 2019-12-12 04:44:51
问题 I need to open with Showdialog() in mdi form because I need to stop code until the mdichild finish. The structure of program is this, I open a mdichild in onCreate of this I instead the class and in the constructor I open de SearchForm There's the code: frm_bsq_persona busqueda_persona = new frm_bsq_persona(); busqueda_persona.MdiParent = this.MdiParent.MdiParent; busqueda_persona.Show(); Thank you very much. 回答1: MDI child as dialog form (MDI modal workaround) http://www.codeproject.com